﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model;
using BLL;
using System.Data;
using DBUtility;
using System.Reflection;

namespace IYASAKAReport
{
    public class ZJReport: VehicleBase
    {
        public ZJReport(RESULT_VEHICLE_INFO result_vehicle_info, bool bSingle)
            : base(result_vehicle_info, bSingle)
        {
            Vehicle_Info = result_vehicle_info;
            bJSDJPD = result_vehicle_info.JYLBDH == "12," ? true : false;
            ZJ_CLZL_TYPE = ZJGetCLZL();
            bTestRG = GetIsTestRG();
            Level1 = "一级";
            Level2 = "二级";
            FlagFails = "*";
            bShowAllJCLSH = false;
            bShowDGSPPY = false;
            Vehicle_Info_GLC = GetVehicleInfoByGLC();

            //一级项目合格数量
            dicLevel.Add("FJX_YJ_T",0);
            //二级项目合格数量
            dicLevel.Add("FJX_EJ_T", 0);
            //一级项目不合格数量
            dicLevel.Add("FJX_F", 0);
            //一般项不合格数量
            dicLevel.Add("YBX_F", 0);
            //关键项不合格数量
            dicLevel.Add("GJX_F", 0);
        }

        /// <summary>
        /// 技术等级一级
        /// </summary>
        public string Level1 {get; set;}

        /// <summary>
        /// 是否显示灯光水平偏移
        /// </summary>
        public bool bShowDGSPPY { get; set; }

        /// <summary>
        /// 技术等级二级
        /// </summary>
        public string Level2 { get; set; }

        /// <summary>
        /// 不合格项目标记
        /// </summary>
        public string FlagFails { get; set; }

        ~ZJReport()
        {
            dicLevel.Clear();
        }

        /// <summary>
        /// 结果详细信息
        /// </summary>
        public RESULT_VEHICLE_INFO Vehicle_Info { get; private set; }

        /// <summary>
        /// 关联车结果详细信息
        /// </summary>
        public RESULT_VEHICLE_INFO Vehicle_Info_GLC { get; private set; }

        /// <summary>
        /// 是否为技术等级评定
        /// </summary>
        public bool bJSDJPD { get; private set; }

        /// <summary>
        /// 得到车辆类型
        /// </summary>
        public ZJ_CLZL ZJ_CLZL_TYPE { get; private set; }

        /// <summary>
        /// 是否检测人工项目
        /// </summary>
        public bool bTestRG { get; private set; }

        /// <summary>
        /// 综检中车辆种类，M类，N类，O类
        /// </summary>
        public enum ZJ_CLZL
        {
            M1 = 0,
            M2,
            M3,
            N1,
            N2,
            N3,
            O1,
            O2,
            O3,
            O4,
            None
        }

        /// <summary>
        /// 统计每个类型，包括一级项合格数，二级项合格数，分级项不合格数等
        /// </summary>
        private Dictionary<string, int> dicLevel = new Dictionary<string, int>();

        /// <summary>
        /// 仪器统计不合格项目
        /// </summary>
        private Dictionary<string, string> dicYQFailItems = new Dictionary<string, string>();

        /// <summary>
        /// 得到车辆种类
        /// </summary>
        /// <returns></returns>
        private ZJ_CLZL ZJGetCLZL()
        {
            if (IS_TYPE_M1())
            {
                return ZJ_CLZL.M1;
            }
            else if (IS_TYPE_M2())
            {
                return ZJ_CLZL.M2;
            }
            else if (IS_TYPE_M3())
            {
                return ZJ_CLZL.M3;
            }
            else if (IS_TYPE_N1())
            {
                return ZJ_CLZL.N1;
            }
            else if (IS_TYPE_N2())
            {
                return ZJ_CLZL.N2;
            }
            else if (IS_TYPE_N3())
            {
                return ZJ_CLZL.N3;
            }
            else if (IS_TYPE_O1())
            {
                return ZJ_CLZL.O1;
            }
            else if (IS_TYPE_O2())
            {
                return ZJ_CLZL.O2;
            }
            else if (IS_TYPE_O3())
            {
                return ZJ_CLZL.O3;
            }
            else if (IS_TYPE_O4())
            {
                return ZJ_CLZL.O4;
            }
            else
            {
                return ZJ_CLZL.None;
            }
        }

        /// <summary>
        /// 得到关联车的详细信息
        /// </summary>
        /// <returns></returns>
        private RESULT_VEHICLE_INFO GetVehicleInfoByGLC()
        {
            RESULT_VEHICLE_INFO cur = new RESULT_VEHICLE_INFO();
            if (IsQCLC)
            {
                RESULT_VEHICLE_INFO_BLL bll = new RESULT_VEHICLE_INFO_BLL();
                cur = bll.GetModel(Vehicle_Info.GLCJCLSH);
            }

            return cur;
        }

        /// <summary>
        /// M1类
        /// </summary>
        /// <param name="strCYS">乘员数</param>
        /// <param name="strCLZLDH">车辆种类代号</param>
        /// <returns></returns>
        public bool IS_TYPE_M1()
        {
            bool b = false;
            if (IsKC && CYS < 10)
            {
                b = true;
            }

            return b;
        }

        /// <summary>
        /// 是否是M2类车
        /// </summary>
        /// <param name="strCYS"></param>
        /// <param name="strZDSJZZL"></param>
        /// <param name="strCLZLDH"></param>
        /// <returns></returns>
        public bool IS_TYPE_M2()
        {
            bool b = false;
            if (IsKC && CYS > 9 && ZZL <= 5000)
            {
                b = true;
            }

            return b;
        }

        /// <summary>
        /// 是否是M3类车
        /// </summary>
        /// <param name="strCYS"></param>
        /// <param name="strZDSJZZL"></param>
        /// <param name="strCLZLDH"></param>
        /// <returns></returns>
        public bool IS_TYPE_M3()
        {
            bool b = false;
            if (IsKC && CYS > 9 && ZZL > 5000)
            {
                b = true;
            }

            return b;
        }

        /// <summary>
        /// 是否是N1类车
        /// </summary>
        /// <param name="strZDSJZZL"></param>
        /// <param name="strCLZLDH"></param>
        /// <returns></returns>
        public bool IS_TYPE_N1()
        {
            bool b = false;
            if (IsHC && ZZL <= 3500)
            {
                b = true;
            }
            return b;
        }

        /// <summary>
        /// 是否是N2类车
        /// </summary>
        /// <param name="strZDSJZZL"></param>
        /// <param name="strCLZLDH"></param>
        /// <returns></returns>
        public bool IS_TYPE_N2()
        {
            bool b = false;
            if (IsHC && ZZL > 3500 && ZZL <= 12000)
            {
                b = true;
            }
            return b;
        }


        /// <summary>
        /// 是否是N3类车
        /// </summary>
        /// <param name="strZDSJZZL"></param>
        /// <param name="strCLZLDH"></param>
        /// <returns></returns>
        public bool IS_TYPE_N3()
        {
            bool b = false;
            if (IsHC && ZZL > 12000)
            {
                b = true;
            }
            return b;
        }

        /// <summary>
        /// 是否是O1类车
        /// </summary>
        /// <param name="strZDSJZZL"></param>
        /// <param name="strCLZLDH"></param>
        /// <returns></returns>
        public bool IS_TYPE_O1()
        {
            bool b = false;
            if (IsGC && ZZL <= 750)
            {
                b = true;
            }
            return b;
        }

        /// <summary>
        /// 是否是O2类车
        /// </summary>
        /// <param name="strZDSJZZL"></param>
        /// <param name="strCLZLDH"></param>
        /// <returns></returns>
        public bool IS_TYPE_O2()
        {
            bool b = false;
            if (IsGC && ZZL > 750 && ZZL <= 3500)
            {
                b = true;
            }
            return b;
        }

        /// <summary>
        /// 是否是O3类车
        /// </summary>
        /// <param name="strZDSJZZL"></param>
        /// <param name="strCLZLDH"></param>
        /// <returns></returns>
        public bool IS_TYPE_O3()
        {
            bool b = false;
            if (IsGC && ZZL > 3500 && ZZL <= 10000)
            {
                b = true;
            }
            return b;
        }

        /// <summary>
        /// 是否是O3类车
        /// </summary>
        /// <param name="strZDSJZZL"></param>
        /// <param name="strCLZLDH"></param>
        /// <returns></returns>
        public bool IS_TYPE_O4()
        {
            bool b = false;
            if (IsGC && ZZL > 10000)
            {
                b = true;
            }
            return b;
        }


        /// <summary>
        /// 得到是否测试人工
        /// </summary>
        /// <returns></returns>
        private bool GetIsTestRG()
        {
            bool b = false;
            RESULT_CHASISS_MANUAL_ZJ_BLL manual_bll = new RESULT_CHASISS_MANUAL_ZJ_BLL();
            for (int i = 0; i < lstJCLSH.Count; i++)
            {
                var manual = manual_bll.GetModel(lstJCLSH[i]);
                if (!string.IsNullOrEmpty(manual.JCLSH))
                {
                    b = true;
                    break;
                }
            }

            return b;
        }

        /// <summary>
        /// 得到基本信息Table
        /// </summary>
        /// <returns></returns>
        public DataTable GetDataTableReport_Base(DataTable dtBase)
        {
            DataRow drBase = dtBase.NewRow();
            drBase["JCLSH"] = JCLSH;
            if (bShowAllJCLSH)
            {
                drBase["ZJLSH"] = Vehicle_Info.ZJLSH;
            }
            else
            {
                drBase["ZJLSH"] = Vehicle_Info.ZJLSH;
            }
            drBase["JYLB"] = Vehicle_Info.JYLB;
            drBase["YWLX"] = Vehicle_Info.YWLX;
            drBase["JCRQ"] = Convert.ToDateTime(Vehicle_Info.JCRQ).ToString("yyyy-MM-dd");
            drBase["JYJG_PD"] = "";
            if (IsGC == false)   //非挂车  汽车列车
            {
                drBase["ZC_HPHM"] = Vehicle_Info.HPHM;
                drBase["ZC_WTR"] = Vehicle_Info.SYR;
                drBase["ZC_CLZL"] = Vehicle_Info.CLZL;
                drBase["ZC_PPXH"] = Vehicle_Info.PPXH;
                drBase["ZC_YYZH"] = Vehicle_Info.YYZH;
                drBase["ZC_CCDJRQ"] = Vehicle_Info.CCDJRQ;
                drBase["ZC_CCRQ"] = Vehicle_Info.CCRQ;
                drBase["ZC_CSYS"] = Vehicle_Info.CSYS;
                drBase["ZC_VIN"] = Vehicle_Info.VIN;
                drBase["ZC_FDJH"] = Vehicle_Info.FDJH;
                drBase["ZC_LXDZ"] = Vehicle_Info.XZQY;

                if (IsQCLC == false)
                {
                    drBase["GC_HPHM"] = Nothing;
                    drBase["GC_CLZL"] = Nothing;
                    drBase["GC_YXXSZJ"] = Nothing;
                    drBase["GC_WTR"] = Nothing;
                    drBase["GC_PPXH"] = Nothing;
                    drBase["GC_YYZH"] = Nothing;
                    drBase["GC_CCDJRQ"] = Nothing;
                    drBase["GC_CCRQ"] = Nothing;
                    drBase["GC_VIN"] = Nothing;
                }
                else
                {
                    drBase["GC_HPHM"] = Vehicle_Info_GLC.HPHM;
                    drBase["GC_CLZL"] = Vehicle_Info_GLC.CLZL;
                    drBase["GC_YXXSZJ"] = Nothing;
                    drBase["GC_WTR"] = Vehicle_Info_GLC.SYR;
                    drBase["GC_PPXH"] = Vehicle_Info_GLC.PPXH;
                    drBase["GC_YYZH"] = Vehicle_Info_GLC.YYZH;
                    drBase["GC_CCDJRQ"] = Vehicle_Info_GLC.CCDJRQ;
                    drBase["GC_CCRQ"] = Vehicle_Info_GLC.CCRQ;
                    drBase["GC_VIN"] = Vehicle_Info_GLC.VIN;
                }
            }
            else
            {
                drBase["GC_HPHM"] = Vehicle_Info.HPHM;
                drBase["GC_WTR"] = Vehicle_Info.SYR;
                drBase["GC_CLZL"] = Vehicle_Info.CLZL;
                drBase["GC_PPXH"] = Vehicle_Info.PPXH;
                drBase["GC_YYZH"] = Vehicle_Info.YYZH;
                drBase["GC_CCDJRQ"] = Vehicle_Info.CCDJRQ;
                drBase["GC_CCRQ"] = Vehicle_Info.CCRQ;
                drBase["GC_VIN"] = Vehicle_Info.VIN;
                drBase["GC_YXXSZJ"] = Nothing;

                drBase["ZC_HPHM"] = Nothing;
                drBase["ZC_WTR"] = Nothing;
                drBase["ZC_CLZL"] = Nothing;
                drBase["ZC_PPXH"] = Nothing;
                drBase["ZC_YYZH"] = Nothing;
                drBase["ZC_CCDJRQ"] = Nothing;
                drBase["ZC_CCRQ"] = Nothing;
                drBase["ZC_CSYS"] = Nothing;
                drBase["ZC_VIN"] = Nothing;
                drBase["ZC_FDJH"] = Nothing;
                drBase["ZC_LXDZ"] = Nothing;
            }

            dtBase.Rows.Add(drBase);
            return dtBase;
        }

        /// <summary>
        /// 返回报告单人工部分
        /// </summary>
        /// <returns></returns>
        public DataTable GetDataTableReport_RG(DataTable dtRG)
        {
            RESULT_CHASISS_MANUAL_ZJ_BLL bll = new RESULT_CHASISS_MANUAL_ZJ_BLL();
            DataRow drRG = SetDataTableDefaultValue(ref dtRG, Nothing);
            RESULT_CHASISS_MANUAL_ZJ M_RESULT_CHASISS_MANUAL_ZJ = new RESULT_CHASISS_MANUAL_ZJ();
            RESULT_CHASISS_MANUAL_ZJ T_RESULT_CHASISS_MANUAL_ZJ = new RESULT_CHASISS_MANUAL_ZJ();
            ModelReflection mR = new ModelReflection();

            if (dtRG.Columns.Contains("FJX_PD") == false)
            {
                dtRG.Columns.Add("FJX_PD");
            }

            if (dtRG.Columns.Contains("FJX_MS") == false)
            {
                dtRG.Columns.Add("FJX_MS");
            }

            if (dtRG.Columns.Contains("CLX_PD") == false)
            {
                dtRG.Columns.Add("CLX_PD");
            }

            if (dtRG.Columns.Contains("CLX_MS") == false)
            {
                dtRG.Columns.Add("CLX_MS");
            }

            if (bTestRG)
            {
                for (int i = 0; i < lstJCLSH.Count; i++)
                {
                    T_RESULT_CHASISS_MANUAL_ZJ = bll.GetModel(lstJCLSH[i]);
                    if (i == 0)
                    {
                        M_RESULT_CHASISS_MANUAL_ZJ = T_RESULT_CHASISS_MANUAL_ZJ;
                    }
                    mR.AutoMapping(T_RESULT_CHASISS_MANUAL_ZJ, M_RESULT_CHASISS_MANUAL_ZJ);
                }

                if (string.IsNullOrEmpty(M_RESULT_CHASISS_MANUAL_ZJ.JCLSH) == false)
                {
                    if (string.IsNullOrEmpty(M_RESULT_CHASISS_MANUAL_ZJ.WYXRD_PD) == false)
                    {
                        drRG["WYXRZBHGX_PD"] = GetPDResult(M_RESULT_CHASISS_MANUAL_ZJ.WYXRD_PD);
                    }
                    if (string.IsNullOrEmpty(M_RESULT_CHASISS_MANUAL_ZJ.WYXRD_MS) == false)
                    {
                        drRG["WYXRZBHGX_MC"] = GetMSResult(M_RESULT_CHASISS_MANUAL_ZJ.WYXRD_MS);
                    }
                    if (string.IsNullOrEmpty(M_RESULT_CHASISS_MANUAL_ZJ.ZCGZZD_PD) == false)
                    {
                        drRG["GZXXZD_PD"] = GetPDResult(M_RESULT_CHASISS_MANUAL_ZJ.ZCGZZD_PD); ;
                    }
                    if (string.IsNullOrEmpty(M_RESULT_CHASISS_MANUAL_ZJ.ZCGZZD_MS) == false)
                    {
                        drRG["GZXXZD_MC"] = GetMSResult(M_RESULT_CHASISS_MANUAL_ZJ.ZCGZZD_MS);
                    }
                    if (string.IsNullOrEmpty(M_RESULT_CHASISS_MANUAL_ZJ.WGJC_PD) == false)
                    {
                        drRG["WGJC_PD"] = GetPDResult(M_RESULT_CHASISS_MANUAL_ZJ.WGJC_PD);
                    }
                    if (string.IsNullOrEmpty(M_RESULT_CHASISS_MANUAL_ZJ.WGJC_MS) == false)
                    {
                        drRG["WGJC_MC"] = GetMSResult(M_RESULT_CHASISS_MANUAL_ZJ.WGJC_MS);
                    }
                    if (string.IsNullOrEmpty(M_RESULT_CHASISS_MANUAL_ZJ.YXJC_PD) == false)
                    {
                        drRG["YXJC_PD"] = GetPDResult(M_RESULT_CHASISS_MANUAL_ZJ.YXJC_PD);
                    }
                    if (string.IsNullOrEmpty(M_RESULT_CHASISS_MANUAL_ZJ.YXJC_MS) == false)
                    {
                        drRG["YXJC_MC"] = GetMSResult(M_RESULT_CHASISS_MANUAL_ZJ.YXJC_MS);
                    }
                    if (string.IsNullOrEmpty(M_RESULT_CHASISS_MANUAL_ZJ.DPBJ_PD) == false)
                    {
                        drRG["DPJC_PD"] = GetPDResult(M_RESULT_CHASISS_MANUAL_ZJ.DPBJ_PD);
                    }
                    if (string.IsNullOrEmpty(M_RESULT_CHASISS_MANUAL_ZJ.DPBJ_MS) == false)
                    {
                        drRG["DPJC_MC"] = GetMSResult(M_RESULT_CHASISS_MANUAL_ZJ.DPBJ_MS);
                    }
                    if (string.IsNullOrEmpty(M_RESULT_CHASISS_MANUAL_ZJ.HCPD_PD) == false)
                    {
                        drRG["HCPD_PD"] = GetPDResult(M_RESULT_CHASISS_MANUAL_ZJ.HCPD_PD);
                    }
                    if (string.IsNullOrEmpty(M_RESULT_CHASISS_MANUAL_ZJ.HCPD_MS) == false)
                    {
                        drRG["HCPD_MC"] = GetMSResult(M_RESULT_CHASISS_MANUAL_ZJ.HCPD_MS);
                    }
                }
            }
            else
            {
                drRG["WYXRZBHGX_PD"] = Nothing;
                drRG["WYXRZBHGX_MC"] = Nothing;
                drRG["GZXXZD_PD"] = Nothing;
                drRG["GZXXZD_MC"] = Nothing;
                drRG["WGJC_PD"] = Nothing;
                drRG["WGJC_MC"] = Nothing;
                drRG["YXJC_PD"] = Nothing;
                drRG["YXJC_MC"] = Nothing;
                drRG["DPJC_PD"] = Nothing;
                drRG["DPJC_MC"] = Nothing;
                drRG["HCPD_PD"] = Nothing;
                drRG["HCPD_MC"] = Nothing;
            }

            dtRG.Rows.Add(drRG);

            if (bTestRG)
            {
                UpdateRGIndexAndName(dtRG, M_RESULT_CHASISS_MANUAL_ZJ);
            }

            return dtRG;
        }

        /// <summary>
        /// 返回报告单仪器部分
        /// </summary>
        /// <returns></returns>
        public List<DataTable> GetDataTableReport_YQ(DataSet ds)
        {
            List<DataTable> lstDt = new List<DataTable>();

            #region 初始化Datatable
            DataTable dtYQ_Item = ds.Tables["dtYQ_Item"];
            DataTable dtYQ_Data = ds.Tables["dtYQ_Data"];
            DataTable dtYQ_STD = ds.Tables["dtYQ_STD"];
            DataTable dtYQ_PD = ds.Tables["dtYQ_PD"];
            DataTable dtYQ_Seq = ds.Tables["dtYQ_Seq"];

            DataRow drYQ_Item = SetDataTableDefaultValue(ref dtYQ_Item, Empty);
            DataRow drYQ_Data = SetDataTableDefaultValue(ref dtYQ_Data, Empty);
            DataRow drYQ_STD = SetDataTableDefaultValue(ref dtYQ_STD, Empty);
            DataRow drYQ_PD = SetDataTableDefaultValue(ref dtYQ_PD, Empty); 
            DataRow drYQ_Seq = SetDataTableDefaultValue(ref dtYQ_Seq, Empty); 
            #endregion

            #region 得到所有检测项目和对应的表
            List<Tuple<string, string, int>> lstXN = new List<Tuple<string, string, int>>();
            foreach (var vJCLSH in lstJCLSH)
            {
                lstXN = ZJSortJYXMByJCLSH(lstXN, vJCLSH);
            }

            lstXN = lstXN.Distinct().ToList();
            #endregion

            Dictionary<string, Tuple<string, string, string, string, string, string>> dicTestItem = new Dictionary<string, Tuple<string, string, string, string, string, string>>();
            for (int i = 1; i < 79; i++)
            {
                Tuple<string, string, string, string, string, string> tl = new Tuple<string, string, string, string, string, string>("", "", "", "", "", "");
                dicTestItem.Add("key" + i, tl);
            }

            ZJGetNXItemsResult(lstXN, dicTestItem);

            int iIndex = 1;
            for (int i = 1; i < 79; i++)
            {
                if (!string.IsNullOrEmpty(dicTestItem["key" + i].Item1))
                {
                    drYQ_Seq["YQ_Seq_" + iIndex] = iIndex;
                    drYQ_Item["BG_ITEM_" + iIndex] = dicTestItem["key" + i].Item2;
                    drYQ_Data["BG_DATA_" + iIndex] = dicTestItem["key" + i].Item3;
                    drYQ_STD["BG_STD_" + iIndex] = dicTestItem["key" + i].Item4;
                    drYQ_PD["BG_PD_" + iIndex] = dicTestItem["key" + i].Item5;
                    if (!string.IsNullOrEmpty(dicTestItem["key" + i].Item6))
                    {
                        if (dicTestItem["key" + i].Item6 == "GJX")
                        {
                            dicLevel["GJX_F"] += 1;
                        }
                        else if (dicTestItem["key" + i].Item6 == "YBX")
                        {
                            dicLevel["YBX_F"] += 1;
                        }
                        else if (dicTestItem["key" + i].Item6 == "YJX")
                        {
                            dicLevel["FJX_YJ_T"] += 1;
                        }
                        else if (dicTestItem["key" + i].Item6 == "EJX")
                        {
                            dicLevel["FJX_EJ_T"] += 1;
                        }
                    }
                    iIndex++;
                }
            }

            dtYQ_Item.Rows.Add(drYQ_Item);
            dtYQ_Data.Rows.Add(drYQ_Data);
            dtYQ_STD.Rows.Add(drYQ_STD);
            dtYQ_PD.Rows.Add(drYQ_PD);
            dtYQ_Seq.Rows.Add(drYQ_Seq);

            lstDt.Add(dtYQ_Item);
            lstDt.Add(dtYQ_Data);
            lstDt.Add(dtYQ_STD);
            lstDt.Add(dtYQ_PD);
            lstDt.Add(dtYQ_Seq);
            return lstDt;
        }

        /// <summary>
        /// 得到Report的数据源
        /// </summary>
        /// <returns></returns>
        public DataSet BindReportResource_Report(DataSet ds)
        {
            DataTable dtBase = GetDataTableReport_Base(ds.Tables["dtBase"]);
            DataTable dtRG = GetDataTableReport_RG(ds.Tables["dtRG"]);

            List<DataTable> lstDataTable = GetDataTableReport_YQ(ds);

            bool bResult = false;

            if (bJSDJPD)//等级评定
            {
                //一级车
                if (dicLevel["FJX_YJ_T"] > 0 && dicLevel["FJX_EJ_T"] == 0 && dicLevel["YBX_F"] <= 3 && dicLevel["GJX_F"] == 0)
                {
                    ds.Tables["dtBase"].Rows[0]["JYJG_PD"] = "经检验，该车符合JT/T198的相关技术要求，技术等级评为一级车辆";
                    bResult = true;
                }
                else if (((dicLevel["FJX_YJ_T"] >= 0 && dicLevel["FJX_EJ_T"] > 0) || (dicLevel["FJX_YJ_T"] > 0 && dicLevel["FJX_EJ_T"] >= 0)) && dicLevel["YBX_F"] <= 6 && dicLevel["GJX_F"] == 0)
                {
                    ds.Tables["dtBase"].Rows[0]["JYJG_PD"] = "经检验，该车符合JT/T198的相关技术要求，技术等级评为二级车辆";
                    bResult = true;
                }
                else if (dicLevel["FJX_YJ_T"] == 0 && dicLevel["FJX_EJ_T"] == 0 && dicLevel["YBX_F"] <= 6 && dicLevel["GJX_F"] == 0)
                {
                    ds.Tables["dtBase"].Rows[0]["JYJG_PD"] = PassC;
                    bResult = true;
                }
                else
                {
                    ds.Tables["dtBase"].Rows[0]["JYJG_PD"] = "经检验，该车不符合JT/T198的相关技术要求，技术等级评为不合格车辆";
                    bResult = false;
                }
            }
            else
            {
                if (dicLevel["YBX_F"] <= 6 && dicLevel["GJX_F"] == 0)
                {
                    ds.Tables["dtBase"].Rows[0]["JYJG_PD"] = PassC;
                    bResult = true;
                }
                else
                {
                    ds.Tables["dtBase"].Rows[0]["JYJG_PD"] = FailC;
                    bResult = false;
                }
            }

            //if (string.IsNullOrEmpty(Vehicle_Info.Z_RESULT) == true)
            //{
                RESULT_VEHICLE_INFO_BLL bll = new RESULT_VEHICLE_INFO_BLL();
                RESULT_VEHICLE_INFO tempInfo = new RESULT_VEHICLE_INFO();
                if (bResult)
                {
                    tempInfo.Z_RESULT = "1";
                }
                else
                {
                    tempInfo.Z_RESULT = "2";
                }
                bll.Update(tempInfo, JCLSH);
            //}

            return ds;
        }

        #region Report人工部分
        /// <summary>
        /// 更新最后显示内容
        /// </summary>
        /// <param name="dtRG"></param>
        private void UpdateRGIndexAndName(DataTable dtRG, RESULT_CHASISS_MANUAL_ZJ M_RESULT_CHASISS_MANUAL_ZJ)
        {
            for (int i = 0; i < dtRG.Rows.Count; i++)
            {
                if (dtRG.Rows[i]["WYXRZBHGX_MC"].ToString() != NothingC)
                {
                    dtRG.Rows[i]["WYXRZBHGX_MC"] = GetRGNameByIndex(dtRG.Rows[i]["WYXRZBHGX_MC"].ToString().Trim());
                }

                if (dtRG.Rows[i]["GZXXZD_MC"].ToString() != NothingC)
                {
                    dtRG.Rows[i]["GZXXZD_MC"] = GetRGNameByIndex(dtRG.Rows[i]["GZXXZD_MC"].ToString().Trim());
                }

                if (dtRG.Rows[i]["WGJC_MC"].ToString() != NothingC)
                {
                    dtRG.Rows[i]["WGJC_MC"] = GetRGNameByIndex(dtRG.Rows[i]["WGJC_MC"].ToString().Trim());
                }

                if (dtRG.Rows[i]["YXJC_MC"].ToString() != NothingC)
                {
                    dtRG.Rows[i]["YXJC_MC"] = GetRGNameByIndex(dtRG.Rows[i]["YXJC_MC"].ToString().Trim());
                }

                if (dtRG.Rows[i]["DPJC_MC"].ToString() != NothingC)
                {
                    dtRG.Rows[i]["DPJC_MC"] = GetRGNameByIndex(dtRG.Rows[i]["DPJC_MC"].ToString().Trim());
                }

                if (dtRG.Rows[i]["HCPD_MC"].ToString() != NothingC)
                {
                    dtRG.Rows[i]["HCPD_MC"] = GetRGNameByIndex(dtRG.Rows[i]["HCPD_MC"].ToString().Trim());
                }

                dtRG.Rows[i]["FJX_PD"] = GetRG_FJX_Info(M_RESULT_CHASISS_MANUAL_ZJ)[0];
                dtRG.Rows[i]["FJX_MS"] = GetRG_FJX_Info(M_RESULT_CHASISS_MANUAL_ZJ)[1];


            }
        }

        /// <summary>
        /// 得到人工分级项的等级
        /// </summary>
        /// <returns></returns>
        private string[] GetRG_FJX_Info(RESULT_CHASISS_MANUAL_ZJ M_RESULT_CHASISS_MANUAL_ZJ)
        {
            string[] strRet = new string[2] { NothingC, PassC};
            //轮胎花纹深度
            if (string.IsNullOrEmpty(M_RESULT_CHASISS_MANUAL_ZJ.LTHWSD_PD) == false)
            {
                if (M_RESULT_CHASISS_MANUAL_ZJ.LTHWSD_PD == "2")
                {//不合格项
                    dicLevel["FJX_F"] = dicLevel["FJX_F"] + 1;
                    strRet[0] = FailC;
                    if (strRet[1] != PassC)
                    {
                        strRet[1] = "轮胎花纹深度、";
                    }
                }
                else if (M_RESULT_CHASISS_MANUAL_ZJ.LTHWSD_PD == "10")
                {//一级项
                    dicLevel["FJX_YJ_T"] = dicLevel["FJX_YJ_T"] + 1;
                }
                else if (M_RESULT_CHASISS_MANUAL_ZJ.LTHWSD_PD == "11")
                {//二级项
                    dicLevel["FJX_YJ_T"] = dicLevel["FJX_YJ_T"] + 1;
                }
            }

            //门窗玻璃
            if (string.IsNullOrEmpty(M_RESULT_CHASISS_MANUAL_ZJ.MCBL_PD) == false)
            {
                if (M_RESULT_CHASISS_MANUAL_ZJ.MCBL_PD == "2")
                {//不合格项
                    dicLevel["FJX_F"] = dicLevel["FJX_F"] + 1;
                    strRet[0] = FailC;
                    if (strRet[1] != PassC)
                    {
                        strRet[1] += "门窗玻璃、";
                    }
                }
                else if (M_RESULT_CHASISS_MANUAL_ZJ.MCBL_PD == "10")
                {//一级项
                    dicLevel["FJX_YJ_T"] = dicLevel["FJX_YJ_T"] + 1;
                }
                else if (M_RESULT_CHASISS_MANUAL_ZJ.MCBL_PD == "11")
                {//二级项
                    dicLevel["FJX_YJ_T"] = dicLevel["FJX_YJ_T"] + 1;
                }
            }

            //门窗玻璃
            if (string.IsNullOrEmpty(M_RESULT_CHASISS_MANUAL_ZJ.CSYJSSL_PD) == false)
            {
                if (M_RESULT_CHASISS_MANUAL_ZJ.CSYJSSL_PD == "2")
                {//不合格项
                    dicLevel["FJX_F"] = dicLevel["FJX_F"] + 1;
                    strRet[0] = FailC;
                    if (strRet[1] != PassC)
                    {
                        strRet[1] += "车身与驾驶室、";
                    }
                }
                else if (M_RESULT_CHASISS_MANUAL_ZJ.CSYJSSL_PD == "10")
                {//一级项
                    dicLevel["FJX_YJ_T"] = dicLevel["FJX_YJ_T"] + 1;
                }
                else if (M_RESULT_CHASISS_MANUAL_ZJ.CSYJSSL_PD == "11")
                {//二级项
                    dicLevel["FJX_YJ_T"] = dicLevel["FJX_YJ_T"] + 1;
                }
            }

            //对称部位高度差
            if (string.IsNullOrEmpty(M_RESULT_CHASISS_MANUAL_ZJ.DCBWGDC_PD) == false)
            {
                if (M_RESULT_CHASISS_MANUAL_ZJ.DCBWGDC_PD == "2")
                {//不合格项
                    dicLevel["FJX_F"] = dicLevel["FJX_F"] + 1;
                    strRet[0] = FailC;
                    if (strRet[1] != PassC)
                    {
                        strRet[1] += "对称部位高度差、";
                    }
                }
                else if (M_RESULT_CHASISS_MANUAL_ZJ.DCBWGDC_PD == "10")
                {//一级项
                    dicLevel["FJX_YJ_T"] = dicLevel["FJX_YJ_T"] + 1;
                }
                else if (M_RESULT_CHASISS_MANUAL_ZJ.DCBWGDC_PD == "11")
                {//二级项
                    dicLevel["FJX_YJ_T"] = dicLevel["FJX_YJ_T"] + 1;
                }
            }

            //车身表面涂装
            if (string.IsNullOrEmpty(M_RESULT_CHASISS_MANUAL_ZJ.CSBMTZ_PD) == false)
            {
                if (M_RESULT_CHASISS_MANUAL_ZJ.CSBMTZ_PD == "2")
                {//不合格项
                    dicLevel["FJX_F"] = dicLevel["FJX_F"] + 1;
                    strRet[0] = FailC;
                    if (strRet[1] != PassC)
                    {
                        strRet[1] += "车身表面涂装、";
                    }
                }
                else if (M_RESULT_CHASISS_MANUAL_ZJ.CSBMTZ_PD == "10")
                {//一级项
                    dicLevel["FJX_YJ_T"] = dicLevel["FJX_YJ_T"] + 1;
                }
                else if (M_RESULT_CHASISS_MANUAL_ZJ.CSBMTZ_PD == "11")
                {//二级项
                    dicLevel["FJX_YJ_T"] = dicLevel["FJX_YJ_T"] + 1;
                }
            }

            //转向盘最大自由转动量
            if (string.IsNullOrEmpty(M_RESULT_CHASISS_MANUAL_ZJ.ZXPZDZYZDL_PD) == false)
            {
                if (M_RESULT_CHASISS_MANUAL_ZJ.ZXPZDZYZDL_PD == "2")
                {//不合格项
                    dicLevel["FJX_F"] = dicLevel["FJX_F"] + 1;
                    strRet[0] = FailC;
                    if (strRet[1] != PassC)
                    {
                        strRet[1] += "转向盘最大自由转动量、";
                    }
                }
                else if (M_RESULT_CHASISS_MANUAL_ZJ.ZXPZDZYZDL_PD == "10")
                {//一级项
                    dicLevel["FJX_YJ_T"] = dicLevel["FJX_YJ_T"] + 1;
                }
                else if (M_RESULT_CHASISS_MANUAL_ZJ.ZXPZDZYZDL_PD == "11")
                {//二级项
                    dicLevel["FJX_YJ_T"] = dicLevel["FJX_YJ_T"] + 1;
                }
            }

            return strRet;
        }

        /// <summary>
        /// 根据不合格项目，得到不合格项目名字汇总
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        private string GetRGNameByIndex(string str)
        {
            string strRet = "";
            if (str.Contains(","))
            {
                string[] strItems = str.Split(',');
                for (int i = 0; i < strItems.Length; i++)
                {
                    if (!string.IsNullOrEmpty(strItems[i]))
                    {
                        strRet += GetRGNameAndLevel(strItems[i]) + "、";
                    }
                }
            }
            else
            {
                strRet = Nothing;
            }

            return strRet;
        }

        /// <summary>
        /// 得到不合格项目汇总
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        private string GetMSResult(string str)
        {
            string strValue = "";
            OUTLOOK_CHASISS_SUBITEM_BLL bll = new OUTLOOK_CHASISS_SUBITEM_BLL();
            if (!string.IsNullOrEmpty(str.Trim()))
            {
                if (str == NothingC)
                {
                    strValue = NothingC;
                }
                else if (str == Nothing)
                {
                    strValue = Nothing;
                }
                else
                {
                    if (bJSDJPD)
                    {
                        string[] strItems = str.Split(',');
                        for (int i = 0; i < strItems.Length; i++)
                        {
                            if (!string.IsNullOrEmpty(strItems[i]))
                            {
                                strValue += GetIndexChangedJSDJ(strItems[i]) + ",";
                            }
                        }
                    }
                    else
                    {
                        strValue = str;
                    }
                }
            }
            else
            {
                strValue = Nothing;
            }
            return strValue;
        }

        /// <summary>
        /// 综检将人工编号转换成技术等级评定编号
        /// </summary>
        /// <param name="iRG"></param>
        /// <returns></returns>
        private string GetIndexChangedJSDJ(string strRG)
        {
            try
            {
                string strSql = " SELECT JSDJPDNUM FROM OUTLOOK_CHASISS_SUBITEM where APPLYCLASS='2' and MITEMID>1 and MITEMID<8 and MID='" + strRG + "'  order by JSDJPDNUM asc";
                return DbHelper.GetValue(strSql);
            }
            catch (Exception ex)
            {
                return "";
            }
        }

        /// <summary>
        /// 得到人工项目的名字，更新不合格项目，不合格项目进行分级
        /// </summary>
        /// <param name="strIndex"></param>
        /// <returns></returns>
        private string GetRGNameAndLevel(string strIndex)
        {
            OUTLOOK_CHASISS_SUBITEM_BLL bll = new OUTLOOK_CHASISS_SUBITEM_BLL();
            if (bJSDJPD)
            {
                var vInfo = bll.GetModelList("APPLYCLASS='2' and MITEMID>1 and MITEMID<8 and JSDJPDNUM='" + strIndex + "'");
                if (vInfo.Length > 0)
                {
                    if (vInfo[0].JSDJPDType == 1)
                    {//关键项
                        dicLevel["GJX_F"] = dicLevel["GJX_F"] + 1;
                    }
                    else if (vInfo[0].JSDJPDType == 2)
                    {//一般项
                        dicLevel["YBX_F"] = dicLevel["YBX_F"] + 1;
                    }
                    else if (vInfo[0].JSDJPDType == 3)
                    {
                        dicLevel["FJX_F"] = dicLevel["FJX_F"] + 1;
                    }

                    return vInfo[0].MNAME;
                }
            }
            else 
            {
                var vInfo = bll.GetModelList("APPLYCLASS='2' and MITEMID>1 and MITEMID<8 and MID='" + strIndex + "'");
                if (vInfo.Length > 0)
                {
                    if (vInfo[0].JSDJPDType == 1)
                    {//关键项
                        dicLevel["GJX_F"] = dicLevel["GJX_F"] + 1;
                    }
                    else if (vInfo[0].JSDJPDType == 2)
                    {//一般项
                        dicLevel["YBX_F"] = dicLevel["YBX_F"] + 1;
                    }
                    else if (vInfo[0].JSDJPDType == 3)
                    {
                        dicLevel["FJX_F"] = dicLevel["FJX_F"] + 1;
                    }

                    return vInfo[0].MNAME;
                }
            }

            return "";
        }
        #endregion

        /// <summary>
        /// 根据流水号得到检验项目和对应的数据库表
        /// </summary>
        /// <param name="jclsh"></param>
        /// <returns></returns>
        private List<Tuple<string, string, int>> ZJSortJYXMByJCLSH(List<Tuple<string, string, int>> lst, string jclsh)
        {
            RESULT_VEHICLE_INFO_BLL bll = new RESULT_VEHICLE_INFO_BLL();
            var info = bll.GetModel(jclsh);

            if (!string.IsNullOrEmpty(info.JYXM))
            {
                if (info.JYXM.Contains(",") && info.JYXM.Substring(info.JYXM.Length - 1, 1) == ",")
                {
                    string strJYXM = info.JYXM.Substring(0, info.JYXM.Length - 1);
                    if (strJYXM.Contains(","))
                    {
                        var str = strJYXM.Split(',');
                        foreach (var v in str)
                        {
                            ZJAddJYXMToList(lst, v);
                        }
                    }
                    else
                    {
                        ZJAddJYXMToList(lst, strJYXM);
                    }
                }
            }

            if (lst.Where(x => x.Item1.Substring(0, 1).ToLower() == "b").ToList().Count > 0 && lst.Where(x => x.Item1.ToLower() == "b9").ToList().Count == 0)
            {
                lst.Add(new Tuple<string, string, int>("B9", "RESULT_BRAKE", 2));
            }

            if (lst.Where(x => x.Item1.Substring(0, 1).ToLower() == "r").ToList().Count > 0)
            {
                lst.Add(new Tuple<string, string, int>("R4", "RESULT_ROAD", 3));
            }

            if (IsNewVehicle && IsGC == false)
            {
                //动力性
                lst.Add(new Tuple<string, string, int>("G0", "RESULT_DPCG", 1));
                //油耗
                lst.Add(new Tuple<string, string, int>("G5", "RESULT_DPCG", 1));
                //排放
                if (IsCYC)
                {
                    lst.Add(new Tuple<string, string, int>("X4", "RESULT_ZYJS", 5));
                }
                if (IsQYC)
                {
                    lst.Add(new Tuple<string, string, int>("X1", "RESULT_SDS", 5));
                }
            }

            return lst.OrderBy(x => x.Item3).ToList();
        }

        /// <summary>
        /// 性能检验结果部分，根据检验项目添加到Lst中，并进行排序
        /// </summary>
        /// <param name="lst"></param>
        /// <param name="jyxm"></param>
        private void ZJAddJYXMToList(List<Tuple<string, string, int>> lst, string jyxm)
        {
            var vType = jyxm.Substring(0, 1).ToLower();
            switch (vType)
            {
                case "s": //速度
                    lst.Add(new Tuple<string, string, int>(jyxm, "RESULT_SPEED", 7));
                    break;
                case "b": //刹车
                    lst.Add(new Tuple<string, string, int>(jyxm, "RESULT_BRAKE", 2));
                    break;
                case "g": //底盘
                    lst.Add(new Tuple<string, string, int>(jyxm, "RESULT_DPCG", 1));
                    break;
                case "h": //灯光
                    lst.Add(new Tuple<string, string, int>(jyxm, "RESULT_LAMP_ZJ", 6));
                    break;
                case "a": //侧滑
                    lst.Add(new Tuple<string, string, int>(jyxm, "RESULT_SIDESLIP", 4));
                    break;
                case "r": //路试
                    lst.Add(new Tuple<string, string, int>(jyxm, "RESULT_ROAD", 3));
                    break;
                case "u": //悬架
                    lst.Add(new Tuple<string, string, int>(jyxm, "RESULT_SUSPENSION", 8));
                    break;
                case "l": //声级
                    lst.Add(new Tuple<string, string, int>(jyxm, "RESULT_SPEAKER", 9));
                    break;
                case "x":
                    if (jyxm.ToLower() == "x4" || jyxm.ToLower() == "x6")
                    {//自由加速
                        lst.Add(new Tuple<string, string, int>(jyxm, "RESULT_ZYJS", 5));
                    }
                    else if(jyxm.ToLower() == "x1")
                    {//双怠速
                        lst.Add(new Tuple<string, string, int>(jyxm, "RESULT_SDS", 5));
                    }
                    else if (jyxm.ToLower() == "x2")
                    {//ASM
                        lst.Add(new Tuple<string, string, int>(jyxm, "RESULT_ASM", 5));
                    }
                    else if (jyxm.ToLower() == "x3")
                    {//VMAS工况
                        lst.Add(new Tuple<string, string, int>(jyxm, "RESULT_VMAS", 5));
                    }
                    else if (jyxm.ToLower() == "x5")
                    {//双怠速
                        lst.Add(new Tuple<string, string, int>(jyxm, "RESULT_LD", 5));
                    }
                    break;
            }
        }

        /// <summary>
        /// 综检得到性能检测结果
        /// </summary>
        /// <param name="jclsh"></param>
        /// <param name="lstXN"></param>
        /// <param name="dicTestItem"></param>
        private void ZJGetNXItemsResult(List<Tuple<string, string, int>> lstXN, Dictionary<string, Tuple<string, string, string, string, string,string>> dicTestItem)
        {
            RESULT_BRAKE_ZJ_BLL brake_bll = new RESULT_BRAKE_ZJ_BLL();
            RESULT_DPCG_BLL dpcg_bll = new RESULT_DPCG_BLL();
            RESULT_ROAD_BLL road_bll = new RESULT_ROAD_BLL();
            RESULT_SIDESLIP_BLL sideslip_bll = new RESULT_SIDESLIP_BLL();
            RESULT_LAMP_ZJ_BLL lamp_bll = new RESULT_LAMP_ZJ_BLL();
            RESULT_SUSPENSION_BLL suspension_bll = new RESULT_SUSPENSION_BLL();
            RESULT_SDS_BLL sds_bll = new RESULT_SDS_BLL();
            RESULT_ASM_BLL asm_bll = new RESULT_ASM_BLL();
            RESULT_VMAS_BLL vmas_bll = new RESULT_VMAS_BLL();
            RESULT_ZYJS_BLL zyjs_bll = new RESULT_ZYJS_BLL();
            RESULT_LD_BLL ld_bll = new RESULT_LD_BLL();
            RESULT_SPEED_BLL speed_bll = new RESULT_SPEED_BLL();
            RESULT_SPEAKER_BLL speaker_bll = new RESULT_SPEAKER_BLL();
            
            RESULT_DPCG M_RESULT_DPCG = new RESULT_DPCG();
            RESULT_DPCG T_RESULT_DPCG = new RESULT_DPCG();

            RESULT_BRAKE_ZJ M_RESULT_BRAKE_ZJ = new RESULT_BRAKE_ZJ();
            RESULT_BRAKE_ZJ T_RESULT_BRAKE_ZJ = new RESULT_BRAKE_ZJ();

            RESULT_ROAD M_RESULT_ROAD = new RESULT_ROAD();
            RESULT_ROAD T_RESULT_ROAD = new RESULT_ROAD();

            RESULT_SIDESLIP M_RESULT_SIDESLIP = new RESULT_SIDESLIP();
            RESULT_SIDESLIP T_RESULT_SIDESLIP = new RESULT_SIDESLIP();

            RESULT_LAMP_ZJ M_RESULT_LAMP_ZJ = new RESULT_LAMP_ZJ();
            RESULT_LAMP_ZJ T_RESULT_LAMP_ZJ = new RESULT_LAMP_ZJ();

            RESULT_SUSPENSION M_RESULT_SUSPENSION = new RESULT_SUSPENSION();
            RESULT_SUSPENSION T_RESULT_SUSPENSION = new RESULT_SUSPENSION();

            RESULT_SDS M_RESULT_SDS = new RESULT_SDS();
            RESULT_SDS T_RESULT_SDS = new RESULT_SDS();

            RESULT_ASM M_RESULT_ASM = new RESULT_ASM();
            RESULT_ASM T_RESULT_ASM = new RESULT_ASM();

            RESULT_VMAS M_RESULT_VMAS = new RESULT_VMAS();
            RESULT_VMAS T_RESULT_VMAS = new RESULT_VMAS();

            RESULT_ZYJS M_RESULT_ZYJS = new RESULT_ZYJS();
            RESULT_ZYJS T_RESULT_ZYJS = new RESULT_ZYJS();

            RESULT_LD M_RESULT_LD = new RESULT_LD();
            RESULT_LD T_RESULT_LD = new RESULT_LD();

            RESULT_SPEED M_RESULT_SPEED = new RESULT_SPEED();
            RESULT_SPEED T_RESULT_SPEED = new RESULT_SPEED();

            RESULT_SPEAKER M_RESULT_SPEAKER = new RESULT_SPEAKER();
            RESULT_SPEAKER T_RESULT_SPEAKER = new RESULT_SPEAKER();

            ModelReflection mR = new ModelReflection();

            for (int i = 0; i < lstJCLSH.Count; i++)
            {
                T_RESULT_DPCG = dpcg_bll.GetModel(lstJCLSH[i]);
                T_RESULT_BRAKE_ZJ = brake_bll.GetModel(lstJCLSH[i]);
                T_RESULT_ROAD = road_bll.GetModel(lstJCLSH[i]);
                T_RESULT_SIDESLIP = sideslip_bll.GetModel(lstJCLSH[i]);
                T_RESULT_LAMP_ZJ = lamp_bll.GetModel(lstJCLSH[i]);
                T_RESULT_SUSPENSION = suspension_bll.GetModel(lstJCLSH[i]);
                T_RESULT_SDS = sds_bll.GetModel(lstJCLSH[i]);
                T_RESULT_ASM = asm_bll.GetModel(lstJCLSH[i]);
                T_RESULT_VMAS = vmas_bll.GetModel(lstJCLSH[i]);
                T_RESULT_ZYJS = zyjs_bll.GetModel(lstJCLSH[i]);
                T_RESULT_LD = ld_bll.GetModel(lstJCLSH[i]);
                T_RESULT_SPEED = speed_bll.GetModel(lstJCLSH[i]);
                T_RESULT_SPEAKER = speaker_bll.GetModel(lstJCLSH[i]);
                if (i == 0)
                {
                    M_RESULT_DPCG = T_RESULT_DPCG;
                    M_RESULT_BRAKE_ZJ = T_RESULT_BRAKE_ZJ;
                    M_RESULT_ROAD = T_RESULT_ROAD;
                    M_RESULT_SIDESLIP = T_RESULT_SIDESLIP;
                    M_RESULT_LAMP_ZJ = T_RESULT_LAMP_ZJ;
                    M_RESULT_SUSPENSION = T_RESULT_SUSPENSION;
                    M_RESULT_SDS = T_RESULT_SDS;
                    M_RESULT_ASM = T_RESULT_ASM;
                    M_RESULT_VMAS = T_RESULT_VMAS;
                    M_RESULT_ZYJS = T_RESULT_ZYJS;
                    M_RESULT_LD = T_RESULT_LD;
                    M_RESULT_SPEED = T_RESULT_SPEED;
                    M_RESULT_SPEAKER = T_RESULT_SPEAKER;
                }

                mR.AutoMapping(T_RESULT_DPCG, M_RESULT_DPCG);
                mR.AutoMapping(T_RESULT_BRAKE_ZJ, M_RESULT_BRAKE_ZJ);
                mR.AutoMapping(T_RESULT_ROAD, M_RESULT_ROAD);
                mR.AutoMapping(T_RESULT_SIDESLIP, M_RESULT_SIDESLIP);
                mR.AutoMapping(T_RESULT_LAMP_ZJ, M_RESULT_LAMP_ZJ);
                mR.AutoMapping(T_RESULT_SUSPENSION, M_RESULT_SUSPENSION);
                mR.AutoMapping(T_RESULT_SDS, M_RESULT_SDS);
                mR.AutoMapping(T_RESULT_ASM, M_RESULT_ASM);
                mR.AutoMapping(T_RESULT_VMAS, M_RESULT_VMAS);
                mR.AutoMapping(T_RESULT_ZYJS, M_RESULT_ZYJS);
                mR.AutoMapping(T_RESULT_LD, M_RESULT_LD);
                mR.AutoMapping(T_RESULT_SPEED, M_RESULT_SPEED);
                mR.AutoMapping(T_RESULT_SPEAKER, M_RESULT_SPEAKER);
            }

                foreach (var v in lstXN)
                {
                    string strTypeItem = "";
                    switch (v.Item1)
                    {
                        case "G0": //底盘
                            if (IsNewVehicle)
                            {
                                strTypeItem = "YJX";
                                dicTestItem["key1"] = new Tuple<string, string, string, string, string, string>("1", "动力性(km/h)", Check, Check, Level1, strTypeItem);
                            }
                            else
                            {
                                if (!string.IsNullOrEmpty(M_RESULT_DPCG.GK_PD) && Convert.ToInt32(M_RESULT_DPCG.GK_PD) > 0)
                                {
                                    strTypeItem = "";
                                    string strPD = "";
                                    if (bJSDJPD)
                                    {//技术等级评定
                                        if (Convert.ToInt32(M_RESULT_DPCG.GK_PD) == 10)
                                        {
                                            strPD = Level1;
                                            strTypeItem = "YJX";
                                        }
                                        else if (Convert.ToInt32(M_RESULT_DPCG.GK_PD) == 11)
                                        {
                                            strPD = Level2;
                                            strTypeItem = "EJX";
                                        }
                                        else
                                        {
                                            strPD = (Convert.ToInt32(M_RESULT_DPCG.GK_PD) == 1) ? PassC : FailC;
                                        }
                                    }
                                    else
                                    {
                                        strPD = (Convert.ToInt32(M_RESULT_DPCG.GK_PD) == 1) ? PassC : FailC;
                                    }
                                    if (Convert.ToInt32(M_RESULT_DPCG.GK_PD) == 2)
                                    {
                                        strTypeItem = "GJX";
                                    }

                                    string strXZValue = MoreThan + M_RESULT_DPCG.GK_EDCS;
                                    Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key1"];
                                    if (string.IsNullOrEmpty(M_RESULT_DPCG.GK_EDCS.Trim()))
                                    {
                                        strXZValue = tpCur.Item4;
                                    }

                                    dicTestItem["key1"] = new Tuple<string, string, string, string, string, string>("1", "动力性(km/h)", M_RESULT_DPCG.GK_WDCS, strXZValue, strPD, strTypeItem);
                                }
                            }
                            break;
                        case "G5": //油耗
                            if (IsNewVehicle && (RLLBDH == "A" || RLLBDH == "B") && ZZL > 3500)
                            {
                                strTypeItem = "";
                                dicTestItem["key2"] = new Tuple<string, string, string, string, string, string>("2", "燃油经济性(L/100km)", Check, Check, PassC, strTypeItem);
                            }
                            else
                            {
                                if (!string.IsNullOrEmpty(M_RESULT_DPCG.YH_PD) && Convert.ToInt32(M_RESULT_DPCG.YH_PD) > 0)
                                {
                                    strTypeItem = "";
                                    if (Convert.ToInt32(M_RESULT_DPCG.YH_PD) == 2)
                                    {
                                        strTypeItem = "GJX";
                                    }
                                    string strXZValue = LessThan + M_RESULT_DPCG.YH_BZ;
                                    Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key2"];
                                    if (string.IsNullOrEmpty(M_RESULT_DPCG.YH_BZ.Trim()))
                                    {
                                        strXZValue = tpCur.Item4;
                                    }

                                    dicTestItem["key2"] = new Tuple<string, string, string, string, string, string>("2", "燃油经济性(L/100km)", M_RESULT_DPCG.YH_SCZ, strXZValue, GetPDResult(M_RESULT_DPCG.YH_PD), strTypeItem);
                                }
                            }
                            break;
                        case "B1":
                            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.YZZDLV_PD) && Convert.ToInt32(M_RESULT_BRAKE_ZJ.YZZDLV_PD) > 0)
                            {
                                strTypeItem = "";
                                if (Convert.ToInt32(M_RESULT_BRAKE_ZJ.YZZDLV_PD) == 2)
                                {
                                    strTypeItem = "GJX";
                                }
                                string strXZValue = MoreThan + M_RESULT_BRAKE_ZJ.YZZDLVBZ;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key3"];
                                if (string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.YZZDLVBZ.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key3"] = new Tuple<string, string, string, string, string, string>("3", "一轴制动率(%)", M_RESULT_BRAKE_ZJ.YZZDLV, strXZValue, GetPDResult(M_RESULT_BRAKE_ZJ.YZZDLV_PD), strTypeItem);
                            }
                            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.YZBPHLV_PD) && Convert.ToInt32(M_RESULT_BRAKE_ZJ.YZBPHLV_PD) > 0)
                            {
                                string[] strRet = GetPDResultDJ(float.Parse(M_RESULT_BRAKE_ZJ.YZBPHLV), Convert.ToInt32(M_RESULT_BRAKE_ZJ.YZBPHLV_PD), true, true);
                                string strXZValue = LessThan + M_RESULT_BRAKE_ZJ.YZBPHLVBZ;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key4"];
                                if (string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.YZBPHLVBZ.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key4"] = new Tuple<string, string, string, string, string, string>("4", "一轴不平衡率(%)",
                                    M_RESULT_BRAKE_ZJ.YZBPHLV, strXZValue, strRet[0], strRet[1]);

                            }
                            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.YZZZZL_PD) && Convert.ToInt32(M_RESULT_BRAKE_ZJ.YZZZZL_PD) > 0)
                            {
                                strTypeItem = "";
                                if (Convert.ToInt32(M_RESULT_BRAKE_ZJ.YZZZZL_PD) == 2)
                                {
                                    strTypeItem = "GJX";
                                }

                                string strXZValue = LessThan + M_RESULT_BRAKE_ZJ.YZZZLVXZBZ;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key5"];
                                if (string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.YZZZLVXZBZ.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key5"] = new Tuple<string, string, string, string, string, string>("5", "一轴左轮阻滞率(%)",
                                    M_RESULT_BRAKE_ZJ.YZZZZLV, strXZValue, GetPDResult(M_RESULT_BRAKE_ZJ.YZZZZL_PD), strTypeItem);

                            }
                            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.YZYZZL_PD) && Convert.ToInt32(M_RESULT_BRAKE_ZJ.YZYZZL_PD) > 0)
                            {
                                strTypeItem = "";
                                if (Convert.ToInt32(M_RESULT_BRAKE_ZJ.YZYZZL_PD) == 2)
                                {
                                    strTypeItem = "GJX";
                                }

                                string strXZValue = LessThan + M_RESULT_BRAKE_ZJ.YZZZLVXZBZ;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key6"];
                                if (string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.YZZZLVXZBZ.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key6"] = new Tuple<string, string, string, string, string, string>("6", "一轴右轮阻滞率(%)",
                                    M_RESULT_BRAKE_ZJ.YZYZZLV, strXZValue, GetPDResult(M_RESULT_BRAKE_ZJ.YZYZZL_PD), strTypeItem);

                            }
                            break;
                        case "B2":
                            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.EZZDLV_PD) && Convert.ToInt32(M_RESULT_BRAKE_ZJ.EZZDLV_PD) > 0)
                            {
                                strTypeItem = "";
                                if (Convert.ToInt32(M_RESULT_BRAKE_ZJ.EZZDLV_PD) == 2)
                                {
                                    strTypeItem = "GJX";
                                }

                                string strXZValue = MoreThan + M_RESULT_BRAKE_ZJ.EZZDLVBZ;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key7"];
                                if (string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.EZZDLVBZ.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key7"] = new Tuple<string, string, string, string, string, string>("7", "二轴制动率(%)",
                                    M_RESULT_BRAKE_ZJ.EZZDLV, strXZValue, GetPDResult(M_RESULT_BRAKE_ZJ.EZZDLV_PD), strTypeItem);

                            }
                            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.EZBPHLV_PD) && Convert.ToInt32(M_RESULT_BRAKE_ZJ.EZBPHLV_PD) > 0)
                            {
                                bool bQZ = ZXZSL == 2 ? true : false;
                                string[] strRet = GetPDResultDJ(float.Parse(M_RESULT_BRAKE_ZJ.EZBPHLV), Convert.ToInt32(M_RESULT_BRAKE_ZJ.EZBPHLV_PD), bQZ, true);

                                string strXZValue = LessThan + M_RESULT_BRAKE_ZJ.EZBPHLVBZ;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key8"];
                                if (string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.EZBPHLVBZ.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key8"] = new Tuple<string, string, string, string, string, string>("8", "二轴不平衡率(%)",
                                    M_RESULT_BRAKE_ZJ.EZBPHLV, strXZValue, strRet[0], strRet[1]);

                            }
                            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.EZZZZL_PD) && Convert.ToInt32(M_RESULT_BRAKE_ZJ.EZZZZL_PD) > 0)
                            {
                                strTypeItem = "";
                                if (Convert.ToInt32(M_RESULT_BRAKE_ZJ.EZZZZL_PD) == 2)
                                {
                                    strTypeItem = "GJX";
                                }

                                string strXZValue = LessThan + M_RESULT_BRAKE_ZJ.EZZZLVXZBZ;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key9"];
                                if (string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.EZZZLVXZBZ.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }
                                dicTestItem["key9"] = new Tuple<string, string, string, string, string, string>("9", "二轴左轮阻滞率(%)",
                                    M_RESULT_BRAKE_ZJ.EZZZZLV, strXZValue, GetPDResult(M_RESULT_BRAKE_ZJ.EZZZZL_PD), strTypeItem);

                            }
                            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.EZYZZL_PD) && Convert.ToInt32(M_RESULT_BRAKE_ZJ.EZYZZL_PD) > 0)
                            {
                                strTypeItem = "";
                                if (Convert.ToInt32(M_RESULT_BRAKE_ZJ.EZYZZL_PD) == 2)
                                {
                                    strTypeItem = "GJX";
                                }

                                string strXZValue = LessThan + M_RESULT_BRAKE_ZJ.EZZZLVXZBZ;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key10"];
                                if (string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.EZZZLVXZBZ.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }
                                dicTestItem["key10"] = new Tuple<string, string, string, string, string, string>("10", "二轴右轮阻滞率(%)",
                                    M_RESULT_BRAKE_ZJ.EZYZZLV, strXZValue, GetPDResult(M_RESULT_BRAKE_ZJ.EZYZZL_PD), strTypeItem);
                            }
                            break;
                        case "B3":
                            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SZZDLV_PD) && Convert.ToInt32(M_RESULT_BRAKE_ZJ.SZZDLV_PD) > 0)
                            {
                                strTypeItem = "";
                                if (Convert.ToInt32(M_RESULT_BRAKE_ZJ.SZZDLV_PD) == 2)
                                {
                                    strTypeItem = "GJX";
                                }
                                string strXZValue = MoreThan + M_RESULT_BRAKE_ZJ.SZZDLVBZ;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key11"];
                                if (string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SZZDLVBZ.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }
                                dicTestItem["key11"] = new Tuple<string, string, string, string, string, string>("11", "三轴制动率(%)",
                                    M_RESULT_BRAKE_ZJ.SZZDLV, strXZValue, GetPDResult(M_RESULT_BRAKE_ZJ.SZZDLV_PD), strTypeItem);

                            }
                            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SZBPHLV_PD) && Convert.ToInt32(M_RESULT_BRAKE_ZJ.SZBPHLV_PD) > 0)
                            {
                                string[] strRet = GetPDResultDJ(float.Parse(M_RESULT_BRAKE_ZJ.SZBPHLV), Convert.ToInt32(M_RESULT_BRAKE_ZJ.SZBPHLV_PD), false, true);

                                string strXZValue = LessThan + M_RESULT_BRAKE_ZJ.SZBPHLVBZ;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key12"];
                                if (string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SZBPHLVBZ.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }
                                dicTestItem["key12"] = new Tuple<string, string, string, string, string, string>("12", "三轴不平衡率(%)",
                                    M_RESULT_BRAKE_ZJ.SZBPHLV, strXZValue, strRet[0], strRet[1]);
                            }
                            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SZZZZL_PD) && Convert.ToInt32(M_RESULT_BRAKE_ZJ.SZZZZL_PD) > 0)
                            {
                                strTypeItem = "";
                                if (Convert.ToInt32(M_RESULT_BRAKE_ZJ.SZZZZL_PD) == 2)
                                {
                                    strTypeItem = "GJX";
                                }

                                string strXZValue = LessThan + M_RESULT_BRAKE_ZJ.SZZZLVXZBZ;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key13"];
                                if (string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SZZZLVXZBZ.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }
                                dicTestItem["key13"] = new Tuple<string, string, string, string, string, string>("13", "三轴左轮阻滞率(%)",
                                    M_RESULT_BRAKE_ZJ.SZZZZLV, strXZValue, GetPDResult(M_RESULT_BRAKE_ZJ.SZZZZL_PD), strTypeItem);

                            }
                            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SZYZZL_PD) && Convert.ToInt32(M_RESULT_BRAKE_ZJ.SZYZZL_PD) > 0)
                            {
                                strTypeItem = "";
                                if (Convert.ToInt32(M_RESULT_BRAKE_ZJ.SZYZZL_PD) == 2)
                                {
                                    strTypeItem = "GJX";
                                }

                                string strXZValue = LessThan + M_RESULT_BRAKE_ZJ.SZZZLVXZBZ;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key14"];
                                if (string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SZZZLVXZBZ.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key14"] = new Tuple<string, string, string, string, string, string>("14", "三轴右轮阻滞率(%)",
                                    M_RESULT_BRAKE_ZJ.SZYZZLV, strXZValue, GetPDResult(M_RESULT_BRAKE_ZJ.SZYZZL_PD), strTypeItem);
                            }
                            break;
                        case "B4":
                            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SIZZDLV_PD) && Convert.ToInt32(M_RESULT_BRAKE_ZJ.SIZZDLV_PD) > 0)
                            {
                                strTypeItem = "";
                                if (Convert.ToInt32(M_RESULT_BRAKE_ZJ.SIZZDLV_PD) == 2)
                                {
                                    strTypeItem = "GJX";
                                }

                                string strXZValue = MoreThan + M_RESULT_BRAKE_ZJ.SIZZDLVBZ;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key15"];
                                if (string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SIZZDLVBZ.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key15"] = new Tuple<string, string, string, string, string, string>("15", "四轴制动率(%)",
                                    M_RESULT_BRAKE_ZJ.SIZZDLV, strXZValue, GetPDResult(M_RESULT_BRAKE_ZJ.SIZZDLV_PD), strTypeItem);

                            }
                            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SIZBPHLV_PD) && Convert.ToInt32(M_RESULT_BRAKE_ZJ.SIZBPHLV_PD) > 0)
                            {
                                string[] strRet = GetPDResultDJ(float.Parse(M_RESULT_BRAKE_ZJ.SIZBPHLV), Convert.ToInt32(M_RESULT_BRAKE_ZJ.SIZBPHLV_PD), false, true);

                                string strXZValue = LessThan + M_RESULT_BRAKE_ZJ.SIZBPHLVBZ;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key16"];
                                if (string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SIZBPHLVBZ.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key16"] = new Tuple<string, string, string, string, string, string>("16", "四轴不平衡率(%)",
                                    M_RESULT_BRAKE_ZJ.SIZBPHLV, strXZValue, strRet[0], strRet[1]);

                            }
                            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SIZZZZL_PD) && Convert.ToInt32(M_RESULT_BRAKE_ZJ.SIZZZZL_PD) > 0)
                            {
                                strTypeItem = "";
                                if (Convert.ToInt32(M_RESULT_BRAKE_ZJ.SIZZZZL_PD) == 2)
                                {
                                    strTypeItem = "GJX";
                                }

                                string strXZValue = LessThan + M_RESULT_BRAKE_ZJ.SIZZZLVXZBZ;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key17"];
                                if (string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SIZZZLVXZBZ.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key17"] = new Tuple<string, string, string, string, string, string>("17", "四轴左轮阻滞率(%)",
                                   M_RESULT_BRAKE_ZJ.SIZZZZLV, strXZValue, GetPDResult(M_RESULT_BRAKE_ZJ.SIZZZZL_PD), strTypeItem);
                            }
                            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SIZYZZL_PD) && Convert.ToInt32(M_RESULT_BRAKE_ZJ.SIZYZZL_PD) > 0)
                            {
                                strTypeItem = "";
                                if (Convert.ToInt32(M_RESULT_BRAKE_ZJ.SIZYZZL_PD) == 2)
                                {
                                    strTypeItem = "GJX";
                                }

                                string strXZValue = LessThan + M_RESULT_BRAKE_ZJ.SIZZZLVXZBZ;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key18"];
                                if (string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SIZZZLVXZBZ.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key18"] = new Tuple<string, string, string, string, string, string>("18", "四轴右轮阻滞率(%)",
                                    M_RESULT_BRAKE_ZJ.SIZYZZLV, strXZValue, GetPDResult(M_RESULT_BRAKE_ZJ.SIZYZZL_PD), strTypeItem);
                            }
                            break;
                        case "B5":
                            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.WZZDLV_PD) && Convert.ToInt32(M_RESULT_BRAKE_ZJ.WZZDLV_PD) > 0)
                            {
                                strTypeItem = "";
                                if (Convert.ToInt32(M_RESULT_BRAKE_ZJ.WZZDLV_PD) == 2)
                                {
                                    strTypeItem = "GJX";
                                }

                                string strXZValue = MoreThan + M_RESULT_BRAKE_ZJ.WZZDLVBZ;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key19"];
                                if (string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.WZZDLVBZ.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key19"] = new Tuple<string, string, string, string, string, string>("19", "五轴制动率(%)",
                                    M_RESULT_BRAKE_ZJ.WZZDLV, strXZValue, (Convert.ToInt32(M_RESULT_BRAKE_ZJ.WZZDLV_PD) == 1) ? PassC : FailC, strTypeItem);

                            }
                            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.WZBPHLV_PD) && Convert.ToInt32(M_RESULT_BRAKE_ZJ.WZBPHLV_PD) > 0)
                            {
                                string[] strRet = GetPDResultDJ(float.Parse(M_RESULT_BRAKE_ZJ.WZBPHLV), Convert.ToInt32(M_RESULT_BRAKE_ZJ.WZBPHLV_PD), false, true);

                                string strXZValue = LessThan + M_RESULT_BRAKE_ZJ.WZBPHLVBZ;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key20"];
                                if (string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.WZBPHLVBZ.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key20"] = new Tuple<string, string, string, string, string, string>("20", "五轴不平衡率(%)",
                                    M_RESULT_BRAKE_ZJ.WZBPHLV, strXZValue, strRet[0], strRet[1]);

                            }
                            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.WZZZZL_PD) && Convert.ToInt32(M_RESULT_BRAKE_ZJ.WZZZZL_PD) > 0)
                            {
                                strTypeItem = "";
                                if (Convert.ToInt32(M_RESULT_BRAKE_ZJ.WZZZZL_PD) == 2)
                                {
                                    strTypeItem = "GJX";
                                }

                                string strXZValue = LessThan + M_RESULT_BRAKE_ZJ.WZZZLVXZBZ;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key21"];
                                if (string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.WZZZLVXZBZ.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key21"] = new Tuple<string, string, string, string, string, string>("21", "五轴左轮阻滞率(%)",
                                    M_RESULT_BRAKE_ZJ.WZZZZLV, strXZValue, GetPDResult(M_RESULT_BRAKE_ZJ.WZZZZL_PD), strTypeItem);

                            }
                            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.WZYZZL_PD) && Convert.ToInt32(M_RESULT_BRAKE_ZJ.WZYZZL_PD) > 0)
                            {
                                strTypeItem = "";
                                if (Convert.ToInt32(M_RESULT_BRAKE_ZJ.WZYZZL_PD) == 2)
                                {
                                    strTypeItem = "GJX";
                                }

                                string strXZValue = LessThan + M_RESULT_BRAKE_ZJ.WZZZLVXZBZ;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key22"];
                                if (string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.WZZZLVXZBZ.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }
                                dicTestItem["key22"] = new Tuple<string, string, string, string, string, string>("22", "五轴右轮阻滞率(%)",
                                    M_RESULT_BRAKE_ZJ.WZYZZLV, strXZValue, GetPDResult(M_RESULT_BRAKE_ZJ.WZYZZL_PD), strTypeItem);
                            }
                            break;
                        case "B6":
                            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.LZZDLV_PD) && Convert.ToInt32(M_RESULT_BRAKE_ZJ.LZZDLV_PD) > 0)
                            {
                                strTypeItem = "";
                                if (Convert.ToInt32(M_RESULT_BRAKE_ZJ.LZZDLV_PD) == 2)
                                {
                                    strTypeItem = "GJX";
                                }
                                string strXZValue = MoreThan + M_RESULT_BRAKE_ZJ.LZZDLVBZ;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key23"];
                                if (string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.LZZDLVBZ.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key23"] = new Tuple<string, string, string, string, string, string>("23", "六轴制动率(%)",
                                    M_RESULT_BRAKE_ZJ.LZZDLV, strXZValue, GetPDResult(M_RESULT_BRAKE_ZJ.LZZDLV_PD), strTypeItem);

                            }
                            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.LZBPHLV_PD) && Convert.ToInt32(M_RESULT_BRAKE_ZJ.LZBPHLV_PD) > 0)
                            {
                                string[] strRet = GetPDResultDJ(float.Parse(M_RESULT_BRAKE_ZJ.LZBPHLV), Convert.ToInt32(M_RESULT_BRAKE_ZJ.LZBPHLV_PD), false, true);

                                string strXZValue = LessThan + M_RESULT_BRAKE_ZJ.LZBPHLVBZ;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key24"];
                                if (string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.LZBPHLVBZ.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key24"] = new Tuple<string, string, string, string, string, string>("24", "六轴不平衡率(%)",
                                    M_RESULT_BRAKE_ZJ.SZBPHLV, strXZValue, strRet[0], strRet[1]);
                            }
                            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.LZZZZL_PD) && Convert.ToInt32(M_RESULT_BRAKE_ZJ.LZZZZL_PD) > 0)
                            {
                                strTypeItem = "";
                                if (Convert.ToInt32(M_RESULT_BRAKE_ZJ.LZZZZL_PD) == 2)
                                {
                                    strTypeItem = "GJX";
                                }

                                string strXZValue = LessThan + M_RESULT_BRAKE_ZJ.LZZZLVXZBZ;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key25"];
                                if (string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.LZZZLVXZBZ.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key25"] = new Tuple<string, string, string, string, string, string>("25", "六轴左轮阻滞率(%)",
                                    M_RESULT_BRAKE_ZJ.LZZZZLV, strXZValue, GetPDResult(M_RESULT_BRAKE_ZJ.LZZZZL_PD), strTypeItem);

                            }
                            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.LZYZZL_PD) && Convert.ToInt32(M_RESULT_BRAKE_ZJ.LZYZZL_PD) > 0)
                            {
                                strTypeItem = "";
                                if (Convert.ToInt32(M_RESULT_BRAKE_ZJ.LZYZZL_PD) == 2)
                                {
                                    strTypeItem = "GJX";
                                }

                                string strXZValue = LessThan + M_RESULT_BRAKE_ZJ.LZZZLVXZBZ;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key26"];
                                if (string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.LZZZLVXZBZ.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key26"] = new Tuple<string, string, string, string, string, string>("26", "六轴右轮阻滞率(%)",
                                    M_RESULT_BRAKE_ZJ.LZYZZLV, strXZValue, GetPDResult(M_RESULT_BRAKE_ZJ.LZYZZL_PD), strTypeItem);
                            }
                            break;
                        case "B9":
                            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.ZCZDLV_PD) && Convert.ToInt32(M_RESULT_BRAKE_ZJ.ZCZDLV_PD) > 0)
                            {
                                strTypeItem = "";
                                if (Convert.ToInt32(M_RESULT_BRAKE_ZJ.ZCZDLV_PD) == 2)
                                {
                                    strTypeItem = "GJX";
                                }

                                string strXZValue = MoreThan + M_RESULT_BRAKE_ZJ.ZCZDLVBZ;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key27"];
                                if (string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.ZCZDLVBZ.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key27"] = new Tuple<string, string, string, string, string, string>("27", "整车制动率(%)",
                                    M_RESULT_BRAKE_ZJ.ZCZDLV, strXZValue, GetPDResult(M_RESULT_BRAKE_ZJ.ZCZDLV_PD), strTypeItem);
                            }
                            break;
                        case "B0":
                            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SZDLV_PD) && Convert.ToInt32(M_RESULT_BRAKE_ZJ.SZDLV_PD) > 0)
                            {
                                strTypeItem = "";
                                if (Convert.ToInt32(M_RESULT_BRAKE_ZJ.SZDLV_PD) == 2)
                                {
                                    strTypeItem = "GJX";
                                }

                                string strXZValue = MoreThan + M_RESULT_BRAKE_ZJ.SZDLVBZ;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key28"];
                                if (string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SZDLVBZ.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key28"] = new Tuple<string, string, string, string, string, string>("28", "驻车制动率(%)",
                                   M_RESULT_BRAKE_ZJ.ZCSZDLV, strXZValue, GetPDResult(M_RESULT_BRAKE_ZJ.SZDLV_PD), strTypeItem);
                            }
                            break;
                        case "R1":
                            if (!string.IsNullOrEmpty(M_RESULT_ROAD.LSZD_PD) && Convert.ToInt32(M_RESULT_ROAD.LSZD_PD) > 0)
                            {
                                string strData = "";
                                if (!string.IsNullOrEmpty(M_RESULT_ROAD.LSZDPPQK) && Convert.ToInt32(M_RESULT_ROAD.LSZDPPQK) == 0)
                                {
                                    strData = "稳定";
                                }
                                else
                                {
                                    strData = "不稳定";
                                }

                                dicTestItem["key29"] = new Tuple<string, string, string, string, string, string>("29", "路试制动稳定性",
                                    strData, "稳定", GetPDResult(M_RESULT_ROAD.LSZD_PD), "");
                            }
                            break;
                        case "R2":
                            if (!string.IsNullOrEmpty(M_RESULT_ROAD.LSZD_PD) && Convert.ToInt32(M_RESULT_ROAD.LSZD_PD) > 0)
                            {
                                string strData = "";
                                if (!string.IsNullOrEmpty(M_RESULT_ROAD.LSZCJL) && Convert.ToInt32(M_RESULT_ROAD.LSZCJL) == 0)
                                {
                                    strData = "不溜坡";
                                }
                                else
                                {
                                    strData = "溜坡";
                                }
                                dicTestItem["key30"] = new Tuple<string, string, string, string, string, string>("30", "路试坡道驻车",
                                    strData, "不溜坡", GetPDResult(M_RESULT_ROAD.LSZD_PD), "");
                            }
                            break;
                        case "R3":
                            if (!string.IsNullOrEmpty(M_RESULT_ROAD.LSZDJL_PD) && Convert.ToInt32(M_RESULT_ROAD.LSZDJL_PD) > 0)
                            {
                                string strXZValue = LessThan + M_RESULT_ROAD.LSZDJLXZ;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key31"];
                                if (string.IsNullOrEmpty(M_RESULT_ROAD.LSZDJLXZ.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key31"] = new Tuple<string, string, string, string, string, string>("31", "路试制动距离",
                                    M_RESULT_ROAD.LSZDJL, strXZValue, GetPDResult(M_RESULT_ROAD.LSZDJL_PD), "");
                            }
                            break;
                        case "R4":
                            if (!string.IsNullOrEmpty(M_RESULT_ROAD.MFDD_PD) && Convert.ToInt32(M_RESULT_ROAD.MFDD_PD) > 0)
                            {
                                string strXZValue = MoreThan + M_RESULT_ROAD.MFDDXZ;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key32"];
                                if (string.IsNullOrEmpty(M_RESULT_ROAD.MFDDXZ.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key32"] = new Tuple<string, string, string, string, string, string>("32", "路试MDFF(m/s²)",
                                    M_RESULT_ROAD.MFDD, strXZValue, GetPDResult(M_RESULT_ROAD.MFDD_PD), "");
                            }
                            break;
                        case "A1":
                            if (!string.IsNullOrEmpty(M_RESULT_SIDESLIP.QQCH_PD) && Convert.ToInt32(M_RESULT_SIDESLIP.QQCH_PD) > 0)
                            {
                                strTypeItem = "";
                                if (Convert.ToInt32(M_RESULT_SIDESLIP.QQCH_PD) == 2)
                                {
                                    strTypeItem = "GJX";
                                }

                                string strXZValue = M_RESULT_SIDESLIP.QQCHXZXX + FromTo + M_RESULT_SIDESLIP.QQCHXZSX;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key33"];
                                if (string.IsNullOrEmpty(M_RESULT_SIDESLIP.QQCHXZXX.Trim()) || string.IsNullOrEmpty(M_RESULT_SIDESLIP.QQCHXZSX.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key33"] = new Tuple<string, string, string, string, string, string>("33", "第一转向轮侧滑量(m/km)",
                                    M_RESULT_SIDESLIP.QQCHSCZ, strXZValue, GetPDResult(M_RESULT_SIDESLIP.QQCH_PD), strTypeItem);
                            }
                            if (!string.IsNullOrEmpty(M_RESULT_SIDESLIP.HQCH_PD) && Convert.ToInt32(M_RESULT_SIDESLIP.HQCH_PD) > 0)
                            {
                                strTypeItem = "";
                                if (Convert.ToInt32(M_RESULT_SIDESLIP.HQCH_PD) == 2)
                                {
                                    strTypeItem = "GJX";
                                }

                                string strXZValue = M_RESULT_SIDESLIP.HQCHXZXX + FromTo + M_RESULT_SIDESLIP.HQCHXZSX;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key34"];
                                if (string.IsNullOrEmpty(M_RESULT_SIDESLIP.HQCHXZXX.Trim()) || string.IsNullOrEmpty(M_RESULT_SIDESLIP.HQCHXZSX.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key34"] = new Tuple<string, string, string, string, string, string>("34", "第二转向轮侧滑量(m/km)",
                                    M_RESULT_SIDESLIP.HQCHSCZ, strXZValue, (Convert.ToInt32(M_RESULT_SIDESLIP.HQCH_PD) == 1) ? PassC : FailC, strTypeItem);
                            }
                            break;
                        case "X1": //双怠速
                            if (IsNewVehicle)
                            {
                                strTypeItem = "";
                                dicTestItem["key35"] = new Tuple<string, string, string, string, string, string>("35", "高怠速HC(10-6)",
                                       Check, Check, PassC, strTypeItem);
                                dicTestItem["key36"] = new Tuple<string, string, string, string, string, string>("36", "高怠速CO(%)",
                                       Check, Check, PassC, strTypeItem);
                                dicTestItem["key37"] = new Tuple<string, string, string, string, string, string>("37", "高怠速(λ)",
                                       Check, Check, PassC, strTypeItem);
                                dicTestItem["key38"] = new Tuple<string, string, string, string, string, string>("38", "怠速HC(10-6)",
                                       Check, Check, PassC, strTypeItem);
                                dicTestItem["key39"] = new Tuple<string, string, string, string, string, string>("39", "怠速CO(%)",
                                       Check, Check, PassC, strTypeItem);

                            }
                            else
                            {
                                if (string.IsNullOrEmpty(M_RESULT_SDS.JCLSH))
                                {
                                    M_RESULT_SDS = Get_RESULT_SDS(GetPQJCLSH(v.Item1));
                                }
                                if (!string.IsNullOrEmpty(M_RESULT_SDS.GDSHC_PD) && Convert.ToInt32(M_RESULT_SDS.GDSHC_PD) > 0)
                                {
                                    strTypeItem = "";
                                    if (Convert.ToInt32(M_RESULT_SDS.GDSHC_PD) == 2)
                                    {
                                        strTypeItem = "GJX";
                                    }

                                    string strXZValue = LessThan + M_RESULT_SDS.GDSHCXZ;
                                    Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key35"];
                                    if (string.IsNullOrEmpty(M_RESULT_SDS.GDSHCXZ.Trim()))
                                    {
                                        strXZValue = tpCur.Item4;
                                    }

                                    dicTestItem["key35"] = new Tuple<string, string, string, string, string, string>("35", "高怠速HC(10-6)",
                                        M_RESULT_SDS.GDSHC, strXZValue, (Convert.ToInt32(M_RESULT_SDS.GDSHC_PD) == 1) ? PassC : FailC, strTypeItem);

                                }
                                if (!string.IsNullOrEmpty(M_RESULT_SDS.GDSCO_PD) && Convert.ToInt32(M_RESULT_SDS.GDSCO_PD) > 0)
                                {
                                    strTypeItem = "";
                                    if (Convert.ToInt32(M_RESULT_SDS.GDSCO_PD) == 2)
                                    {
                                        strTypeItem = "GJX";
                                    }

                                    string strXZValue = LessThan + M_RESULT_SDS.GDSCOXZ;
                                    Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key36"];
                                    if (string.IsNullOrEmpty(M_RESULT_SDS.GDSCOXZ.Trim()))
                                    {
                                        strXZValue = tpCur.Item4;
                                    }

                                    dicTestItem["key36"] = new Tuple<string, string, string, string, string, string>("36", "高怠速CO(%)",
                                        M_RESULT_SDS.GDSCO, strXZValue, (Convert.ToInt32(M_RESULT_SDS.GDSCO_PD) == 1) ? PassC : FailC, strTypeItem);
                                }
                                if (!string.IsNullOrEmpty(M_RESULT_SDS.GLKQXS_PD) && Convert.ToInt32(M_RESULT_SDS.GLKQXS_PD) > 0)
                                {
                                    strTypeItem = "";
                                    if (Convert.ToInt32(M_RESULT_SDS.GLKQXS_PD) == 2)
                                    {
                                        strTypeItem = "GJX";
                                    }

                                    string strXZValue = M_RESULT_SDS.GLKQXSXX + FromTo + M_RESULT_SDS.GLKQXSSX;
                                    Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key37"];
                                    if (string.IsNullOrEmpty(M_RESULT_SDS.GLKQXSXX.Trim()) || string.IsNullOrEmpty(M_RESULT_SDS.GLKQXSSX.Trim()))
                                    {
                                        strXZValue = tpCur.Item4;
                                    }

                                    dicTestItem["key37"] = new Tuple<string, string, string, string, string, string>("37", "高怠速(λ)",
                                        M_RESULT_SDS.GLKQXS, strXZValue, GetPDResult(M_RESULT_SDS.GLKQXS_PD), strTypeItem);

                                }
                                if (!string.IsNullOrEmpty(M_RESULT_SDS.DSHC_PD) && Convert.ToInt32(M_RESULT_SDS.DSHC_PD) > 0)
                                {
                                    strTypeItem = "";
                                    if (Convert.ToInt32(M_RESULT_SDS.DSHC_PD) == 2)
                                    {
                                        strTypeItem = "GJX";
                                    }

                                    string strXZValue = LessThan + M_RESULT_SDS.DSHCXZ;
                                    Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key38"];
                                    if (string.IsNullOrEmpty(M_RESULT_SDS.DSHCXZ.Trim()))
                                    {
                                        strXZValue = tpCur.Item4;
                                    }

                                    dicTestItem["key38"] = new Tuple<string, string, string, string, string, string>("38", "怠速HC(10-6)",
                                       M_RESULT_SDS.DSHC, strXZValue, (Convert.ToInt32(M_RESULT_SDS.DSHC_PD) == 1) ? PassC : FailC, strTypeItem);

                                }
                                if (!string.IsNullOrEmpty(M_RESULT_SDS.DSCO_PD) && Convert.ToInt32(M_RESULT_SDS.DSCO_PD) > 0)
                                {
                                    strTypeItem = "";
                                    if (Convert.ToInt32(M_RESULT_SDS.DSCO_PD) == 2)
                                    {
                                        strTypeItem = "GJX";
                                    }

                                    string strXZValue = LessThan + M_RESULT_SDS.DSCOXZ;
                                    Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key39"];
                                    if (string.IsNullOrEmpty(M_RESULT_SDS.DSCOXZ.Trim()))
                                    {
                                        strXZValue = tpCur.Item4;
                                    }

                                    dicTestItem["key39"] = new Tuple<string, string, string, string, string, string>("39", "怠速CO(%)",
                                      M_RESULT_SDS.DSCO, strXZValue, GetPDResult(M_RESULT_SDS.DSCO_PD), strTypeItem);
                                }
                            }
                            break;
                        case "X2": //ASM工况
                            if (IsNewVehicle)
                            {
                                strTypeItem = "";
                                dicTestItem["key40"] = new Tuple<string, string, string, string, string, string>("40", "稳态5025工况CO(%)",
                                       Check, Check, PassC, strTypeItem);
                                dicTestItem["key41"] = new Tuple<string, string, string, string, string, string>("41", "稳态5025工况HC(10-6)",
                                       Check, Check, PassC, strTypeItem);
                                dicTestItem["key42"] = new Tuple<string, string, string, string, string, string>("42", "稳态5025工况NO(10-6)",
                                       Check, Check, PassC, strTypeItem);
                                dicTestItem["key43"] = new Tuple<string, string, string, string, string, string>("43", "稳态2540工况CO(%)",
                                       Check, Check, PassC, strTypeItem);
                                dicTestItem["key44"] = new Tuple<string, string, string, string, string, string>("44", "稳态2540工况HC(10-6)",
                                       Check, Check, PassC, strTypeItem);
                                dicTestItem["key45"] = new Tuple<string, string, string, string, string, string>("45", "稳态2540工况NO(10-6)",
                                       Check, Check, PassC, strTypeItem);
                            }
                            else
                            {
                                if (string.IsNullOrEmpty(M_RESULT_ASM.JCLSH))
                                {
                                    M_RESULT_ASM = Get_RESULT_ASM(GetPQJCLSH(v.Item1));
                                }
                                if (!string.IsNullOrEmpty(M_RESULT_ASM.CO5025_PD) && Convert.ToInt32(M_RESULT_ASM.CO5025_PD) > 0)
                                {
                                    strTypeItem = "";
                                    if (Convert.ToInt32(M_RESULT_ASM.CO5025_PD) == 2)
                                    {
                                        strTypeItem = "GJX";
                                    }

                                    string strXZValue = LessThan + M_RESULT_ASM.CO5025XZ;
                                    Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key40"];
                                    if (string.IsNullOrEmpty(M_RESULT_ASM.CO5025XZ.Trim()))
                                    {
                                        strXZValue = tpCur.Item4;
                                    }

                                    dicTestItem["key40"] = new Tuple<string, string, string, string, string, string>("40", "稳态5025工况CO(%)",
                                       M_RESULT_ASM.CO5025JG, strXZValue, GetPDResult(M_RESULT_ASM.CO5025_PD), strTypeItem);
                                }
                                if (!string.IsNullOrEmpty(M_RESULT_ASM.HC5025_PD) && Convert.ToInt32(M_RESULT_ASM.HC5025_PD) > 0)
                                {
                                    strTypeItem = "";
                                    if (Convert.ToInt32(M_RESULT_ASM.HC5025_PD) == 2)
                                    {
                                        strTypeItem = "GJX";
                                    }

                                    string strXZValue = LessThan + M_RESULT_ASM.HC5025XZ;
                                    Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key41"];
                                    if (string.IsNullOrEmpty(M_RESULT_ASM.HC5025XZ.Trim()))
                                    {
                                        strXZValue = tpCur.Item4;
                                    }
                                    dicTestItem["key41"] = new Tuple<string, string, string, string, string, string>("41", "稳态5025工况HC(10-6)",
                                       M_RESULT_ASM.HC5025JG, strXZValue, (Convert.ToInt32(M_RESULT_ASM.HC5025_PD) == 1) ? PassC : FailC, strTypeItem);
                                }
                                if (!string.IsNullOrEmpty(M_RESULT_ASM.NO5025_PD) && Convert.ToInt32(M_RESULT_ASM.NO5025_PD) > 0)
                                {
                                    strTypeItem = "";
                                    if (Convert.ToInt32(M_RESULT_ASM.NO5025_PD) == 2)
                                    {
                                        strTypeItem = "GJX";
                                    }
                                    string strXZValue = LessThan + M_RESULT_ASM.NO5025XZ;
                                    Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key42"];
                                    if (string.IsNullOrEmpty(M_RESULT_ASM.NO5025XZ.Trim()))
                                    {
                                        strXZValue = tpCur.Item4;
                                    }
                                    dicTestItem["key42"] = new Tuple<string, string, string, string, string, string>("42", "稳态5025工况NO(10-6)",
                                       M_RESULT_ASM.NO5025JG, strXZValue, (Convert.ToInt32(M_RESULT_ASM.NO5025_PD) == 1) ? PassC : FailC, strTypeItem);
                                }
                                if (!string.IsNullOrEmpty(M_RESULT_ASM.CO2540_PD) && Convert.ToInt32(M_RESULT_ASM.CO2540_PD) > 0)
                                {
                                    strTypeItem = "";
                                    if (Convert.ToInt32(M_RESULT_ASM.CO2540_PD) == 2)
                                    {
                                        strTypeItem = "GJX";
                                    }

                                    string strXZValue = LessThan + M_RESULT_ASM.CO2540JG;
                                    Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key43"];
                                    if (string.IsNullOrEmpty(M_RESULT_ASM.CO2540JG.Trim()))
                                    {
                                        strXZValue = tpCur.Item4;
                                    }

                                    dicTestItem["key43"] = new Tuple<string, string, string, string, string, string>("43", "稳态2540工况CO(%)",
                                       M_RESULT_ASM.CO2540JG, strXZValue, GetPDResult(M_RESULT_ASM.CO2540_PD), strTypeItem);
                                }
                                if (!string.IsNullOrEmpty(M_RESULT_ASM.HC2540_PD) && Convert.ToInt32(M_RESULT_ASM.HC2540_PD) > 0)
                                {
                                    strTypeItem = "";
                                    if (Convert.ToInt32(M_RESULT_ASM.HC2540_PD) == 2)
                                    {
                                        strTypeItem = "GJX";
                                    }

                                    string strXZValue = LessThan + M_RESULT_ASM.HC2540XZ;
                                    Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key44"];
                                    if (string.IsNullOrEmpty(M_RESULT_ASM.HC2540XZ.Trim()))
                                    {
                                        strXZValue = tpCur.Item4;
                                    }

                                    dicTestItem["key44"] = new Tuple<string, string, string, string, string, string>("44", "稳态2540工况HC(10-6)",
                                       M_RESULT_ASM.HC2540JG, strXZValue, GetPDResult(M_RESULT_ASM.HC2540_PD), strTypeItem);
                                }
                                if (!string.IsNullOrEmpty(M_RESULT_ASM.NO2540_PD) && Convert.ToInt32(M_RESULT_ASM.NO2540_PD) > 0)
                                {
                                    strTypeItem = "";
                                    if (Convert.ToInt32(M_RESULT_ASM.NO2540_PD) == 2)
                                    {
                                        strTypeItem = "GJX";
                                    }

                                    string strXZValue = LessThan + M_RESULT_ASM.NO2540XZ;
                                    Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key45"];
                                    if (string.IsNullOrEmpty(M_RESULT_ASM.NO2540XZ.Trim()))
                                    {
                                        strXZValue = tpCur.Item4;
                                    }

                                    dicTestItem["key45"] = new Tuple<string, string, string, string, string, string>("45", "稳态2540工况NO(10-6)",
                                       M_RESULT_ASM.NO2540JG, strXZValue, GetPDResult(M_RESULT_ASM.NO2540_PD), strTypeItem);
                                }
                            }
                            break;
                        case "X3": //VMAS工况
                            if (IsNewVehicle)
                            {
                                strTypeItem = "";
                                dicTestItem["key46"] = new Tuple<string, string, string, string, string, string>("46", "简易瞬态工况CO(g/km)",
                                      Check, Check, PassC, strTypeItem);
                                dicTestItem["key47"] = new Tuple<string, string, string, string, string, string>("47", "简易瞬态工况HC(g/km)",
                                       Check, Check, PassC, strTypeItem);
                                dicTestItem["key48"] = new Tuple<string, string, string, string, string, string>("48", "简易瞬态工况NO(g/km)",
                                       Check, Check, PassC, strTypeItem);
                                dicTestItem["key49"] = new Tuple<string, string, string, string, string, string>("49", "简易瞬态工况HC+NO(g/km)",
                                       Check, Check, PassC, strTypeItem);
                            }
                            else
                            {
                                if (string.IsNullOrEmpty(M_RESULT_VMAS.JCLSH))
                                {
                                    M_RESULT_VMAS = Get_RESULT_VMAS(GetPQJCLSH(v.Item1));
                                }

                                if (!string.IsNullOrEmpty(M_RESULT_VMAS.CO_PD) && Convert.ToInt32(M_RESULT_VMAS.CO_PD) > 0)
                                {
                                    strTypeItem = "";
                                    if (Convert.ToInt32(M_RESULT_VMAS.CO_PD) == 2)
                                    {
                                        strTypeItem = "GJX";
                                    }

                                    string strXZValue = LessThan + M_RESULT_VMAS.COXZ;
                                    Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key46"];
                                    if (string.IsNullOrEmpty(M_RESULT_VMAS.COXZ.Trim()))
                                    {
                                        strXZValue = tpCur.Item4;
                                    }

                                    dicTestItem["key46"] = new Tuple<string, string, string, string, string, string>("46", "简易瞬态工况CO(g/km)",
                                       M_RESULT_VMAS.COJG, strXZValue, GetPDResult(M_RESULT_VMAS.CO_PD), strTypeItem);
                                }

                                if (M_RESULT_VMAS.PDFS == "1")
                                {
                                    if (!string.IsNullOrEmpty(M_RESULT_VMAS.HC_NO_PD) && Convert.ToInt32(M_RESULT_VMAS.HC_NO_PD) > 0)
                                    {
                                        strTypeItem = "";
                                        if (Convert.ToInt32(M_RESULT_VMAS.HC_NO_PD) == 2)
                                        {
                                            strTypeItem = "GJX";
                                        }

                                        string strXZValue = LessThan + M_RESULT_VMAS.HC_NOXZ;
                                        Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key47"];
                                        if (string.IsNullOrEmpty(M_RESULT_VMAS.HC_NOXZ.Trim()))
                                        {
                                            strXZValue = tpCur.Item4;
                                        }

                                        dicTestItem["key47"] = new Tuple<string, string, string, string, string, string>("47", "简易瞬态工况HC+NO(g/km)",
                                           M_RESULT_VMAS.HC_NOJG, strXZValue, GetPDResult(M_RESULT_VMAS.HC_NO_PD), strTypeItem);
                                    }
                                }
                                else if (M_RESULT_VMAS.PDFS == "0")
                                {
                                    if (!string.IsNullOrEmpty(M_RESULT_VMAS.HC_PD) && Convert.ToInt32(M_RESULT_VMAS.HC_PD) > 0)
                                    {
                                        strTypeItem = "";
                                        if (Convert.ToInt32(M_RESULT_VMAS.HC_PD) == 2)
                                        {
                                            strTypeItem = "GJX";
                                        }

                                        string strXZValue = LessThan + M_RESULT_VMAS.HCXZ;
                                        Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key48"];
                                        if (string.IsNullOrEmpty(M_RESULT_VMAS.HCXZ.Trim()))
                                        {
                                            strXZValue = tpCur.Item4;
                                        }

                                        dicTestItem["key48"] = new Tuple<string, string, string, string, string, string>("48", "简易瞬态工况HC(g/km)",
                                           M_RESULT_VMAS.HCJG, strXZValue, GetPDResult(M_RESULT_VMAS.HC_PD), strTypeItem);
                                    }

                                    if (!string.IsNullOrEmpty(M_RESULT_VMAS.NO_PD) && Convert.ToInt32(M_RESULT_VMAS.NO_PD) > 0)
                                    {
                                        strTypeItem = "";
                                        if (Convert.ToInt32(M_RESULT_VMAS.NO_PD) == 2)
                                        {
                                            strTypeItem = "GJX";
                                        }

                                        string strXZValue = LessThan + M_RESULT_VMAS.NOXZ;
                                        Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key49"];
                                        if (string.IsNullOrEmpty(M_RESULT_VMAS.NOXZ.Trim()))
                                        {
                                            strXZValue = tpCur.Item4;
                                        }

                                        dicTestItem["key49"] = new Tuple<string, string, string, string, string, string>("49", "简易瞬态工况NO(g/km)",
                                           M_RESULT_VMAS.NOJG, strXZValue, GetPDResult(M_RESULT_VMAS.NO_PD), strTypeItem);
                                    }
                                }
                            }
                            break;
                        case "X4": //自由加速
                        case "X6"://自由加速(滤纸)
                            if (IsNewVehicle)
                            {
                                strTypeItem = "";
                                dicTestItem["key50"] = new Tuple<string, string, string, string, string, string>("50", "光吸收系数(m-1)",
                                     Check, Check, PassC, strTypeItem);
                            }
                            else
                            {
                                if (string.IsNullOrEmpty(M_RESULT_ZYJS.JCLSH))
                                {
                                    M_RESULT_ZYJS = Get_RESULT_ZYJS(GetPQJCLSH(v.Item1));
                                }

                                if (!string.IsNullOrEmpty(M_RESULT_ZYJS.ZYJS_PD) && Convert.ToInt32(M_RESULT_ZYJS.ZYJS_PD) > 0)
                                {
                                    strTypeItem = "";
                                    if (Convert.ToInt32(M_RESULT_ZYJS.ZYJS_PD) == 2)
                                    {
                                        strTypeItem = "GJX";
                                    }

                                    string strXZValue = LessThan + M_RESULT_ZYJS.ZYJSXZ;
                                    Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key50"];
                                    if (string.IsNullOrEmpty(M_RESULT_ZYJS.ZYJSXZ.Trim()))
                                    {
                                        strXZValue = tpCur.Item4;
                                    }

                                    dicTestItem["key50"] = new Tuple<string, string, string, string, string, string>("50", "光吸收系数(m-1)",
                                      M_RESULT_ZYJS.ZYJSPJZ, strXZValue, GetPDResult(M_RESULT_ZYJS.ZYJS_PD), strTypeItem);
                                }
                            }
                            break;
                        case "X5"://加载减速
                            
                            if (IsNewVehicle)
                            {
                                strTypeItem = "";
                                dicTestItem["key51"] = new Tuple<string, string, string, string, string, string>("51", "光吸收系数(80%)",
                                     Check, Check, PassC, strTypeItem);
                                dicTestItem["key52"] = new Tuple<string, string, string, string, string, string>("52", "光吸收系数(90%)",
                                    Check, Check, PassC, strTypeItem);
                                dicTestItem["key53"] = new Tuple<string, string, string, string, string, string>("53", "光吸收系数(100%)",
                                    Check, Check, PassC, strTypeItem);
                                dicTestItem["key54"] = new Tuple<string, string, string, string, string, string>("54", "最大轮边功率",
                                   Check, Check, PassC, strTypeItem);
                            }
                            else
                            {
                                if (string.IsNullOrEmpty(M_RESULT_LD.JCLSH))
                                {
                                    M_RESULT_LD = Get_RESULT_LD(GetPQJCLSH(v.Item1));
                                }

                                if (!string.IsNullOrEmpty(M_RESULT_LD.GXSXS80))
                                {
                                    strTypeItem = "";
                                    if (Convert.ToDouble(M_RESULT_LD.GXSXS80) <= Convert.ToDouble(M_RESULT_LD.GXSXSXZ) == false)
                                    {
                                        strTypeItem = "GJX";
                                    }

                                    string strXZValue = LessThan + M_RESULT_LD.GXSXSXZ;
                                    Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key51"];
                                    if (string.IsNullOrEmpty(M_RESULT_LD.GXSXSXZ.Trim()))
                                    {
                                        strXZValue = tpCur.Item4;
                                    }

                                    dicTestItem["key51"] = new Tuple<string, string, string, string, string, string>("51", "光吸收系数(80%)",
                                      M_RESULT_LD.GXSXS80, strXZValue, Convert.ToDouble(M_RESULT_LD.GXSXS80) <= Convert.ToDouble(M_RESULT_LD.GXSXSXZ) == true ? PassC : FailC, strTypeItem);

                                }
                                if (!string.IsNullOrEmpty(M_RESULT_LD.GXSXS90))
                                {
                                    strTypeItem = "";
                                    if (Convert.ToDouble(M_RESULT_LD.GXSXS90) <= Convert.ToDouble(M_RESULT_LD.GXSXSXZ) == false)
                                    {
                                        strTypeItem = "GJX";
                                    }

                                    string strXZValue = LessThan + M_RESULT_LD.GXSXSXZ;
                                    Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key52"];
                                    if (string.IsNullOrEmpty(M_RESULT_LD.GXSXSXZ.Trim()))
                                    {
                                        strXZValue = tpCur.Item4;
                                    }

                                    dicTestItem["key52"] = new Tuple<string, string, string, string, string, string>("52", "光吸收系数(90%)",
                                      M_RESULT_LD.GXSXS90, strXZValue, Convert.ToDouble(M_RESULT_LD.GXSXS90) <= Convert.ToDouble(M_RESULT_LD.GXSXSXZ) == true ? PassC : FailC, strTypeItem);

                                }
                                if (!string.IsNullOrEmpty(M_RESULT_LD.GXSXS100))
                                {
                                    strTypeItem = "";
                                    if (Convert.ToDouble(M_RESULT_LD.GXSXS100) <= Convert.ToDouble(M_RESULT_LD.GXSXSXZ) == false)
                                    {
                                        strTypeItem = "GJX";
                                    }

                                    string strXZValue = LessThan + M_RESULT_LD.GXSXSXZ;
                                    Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key53"];
                                    if (string.IsNullOrEmpty(M_RESULT_LD.GXSXSXZ.Trim()))
                                    {
                                        strXZValue = tpCur.Item4;
                                    }

                                    dicTestItem["key53"] = new Tuple<string, string, string, string, string, string>("53", "光吸收系数(100%)",
                                      M_RESULT_LD.GXSXS100, strXZValue, Convert.ToDouble(M_RESULT_LD.GXSXS100) <= Convert.ToDouble(M_RESULT_LD.GXSXSXZ) == true ? PassC : FailC, strTypeItem);
                                }

                                if (!string.IsNullOrEmpty(M_RESULT_LD.GL_PD) && Convert.ToInt32(M_RESULT_LD.GL_PD) > 0)
                                {
                                    strTypeItem = "";
                                    if (Convert.ToInt32(M_RESULT_LD.GL_PD) == 2)
                                    {
                                        strTypeItem = "GJX";
                                    }

                                    string strXZValue = MoreThan + M_RESULT_LD.GLXZ;
                                    Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key54"];
                                    if (string.IsNullOrEmpty(M_RESULT_LD.GXSXSXZ.Trim()))
                                    {
                                        strXZValue = tpCur.Item4;
                                    }

                                    dicTestItem["key54"] = new Tuple<string, string, string, string, string, string>("54", "最大轮边功率",
                                      M_RESULT_LD.GLJG, strXZValue, GetPDResult(M_RESULT_LD.GL_PD), strTypeItem);
                                }
                            }
                            break;
                        case "H1": //左外灯
                            if (!string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.ZWDYGGQ_PD) && M_RESULT_LAMP_ZJ.ZWDYGGQ_PD.Trim() !=  Nothing && Convert.ToInt32(M_RESULT_LAMP_ZJ.ZWDYGGQ_PD) > 0)
                            {
                                strTypeItem = "";
                                if (Convert.ToInt32(M_RESULT_LAMP_ZJ.ZWDYGGQ_PD) == 2)
                                {
                                    strTypeItem = "GJX";
                                }

                                string strXZValue = MoreThan + M_RESULT_LAMP_ZJ.DGGQXZ;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key55"];
                                if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.DGGQXZ.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key55"] = new Tuple<string, string, string, string, string, string>("55", "左外灯远光光强(cd)",
                                    M_RESULT_LAMP_ZJ.ZWDYGGQ, strXZValue, GetPDResult(M_RESULT_LAMP_ZJ.ZWDYGGQ_PD), strTypeItem);
                            }
                            if (!string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.ZWDYGCZPY_PD) && M_RESULT_LAMP_ZJ.ZWDYGCZPY_PD.Trim() != Nothing && Convert.ToInt32(M_RESULT_LAMP_ZJ.ZWDYGCZPY_PD) > 0)
                            {
                                strTypeItem = "";
                                if (Convert.ToInt32(M_RESULT_LAMP_ZJ.ZWDYGCZPY_PD) == 2)
                                {
                                    strTypeItem = "YBX";
                                }

                                string strXZValue = M_RESULT_LAMP_ZJ.YGCZPYXZXX + FromTo + M_RESULT_LAMP_ZJ.YGCZPYXZSX;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key56"];
                                if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YGCZPYXZXX.Trim()) || string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YGCZPYXZSX.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key56"] = new Tuple<string, string, string, string, string, string>("56", "左外灯远光垂直偏移量(H)",
                                    M_RESULT_LAMP_ZJ.ZWDYGCZPY, strXZValue, GetPDResult(M_RESULT_LAMP_ZJ.ZWDYGCZPY_PD), strTypeItem);
                            }
                            if (!string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.ZWDYGSPPY_PD) && M_RESULT_LAMP_ZJ.ZWDYGSPPY_PD.Trim() != Nothing && Convert.ToInt32(M_RESULT_LAMP_ZJ.ZWDYGSPPY_PD) > 0)
                            {
                                string strData = "";
                                if (Convert.ToDecimal(M_RESULT_LAMP_ZJ.ZWDYGSPPYL) < 0)
                                {
                                    strData = "右" + Math.Abs(Convert.ToInt32(M_RESULT_LAMP_ZJ.ZWDYGSPPYL));
                                }
                                else
                                {
                                    strData = "左" + M_RESULT_LAMP_ZJ.ZWDYGSPPYL;
                                }

                                string strXZValue = "右" + M_RESULT_LAMP_ZJ.YGZDYPXZ + FromTo + "左" + M_RESULT_LAMP_ZJ.YGZDZPXZ;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key57"];
                                if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YGZDYPXZ.Trim()) || string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YGZDZPXZ.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                if (bShowDGSPPY)
                                {
                                    dicTestItem["key57"] = new Tuple<string, string, string, string, string, string>("57", "左外灯远光水平偏移量",
                                        strData, strXZValue, NoAudit, "");
                                }
                            }
                            if (!string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.ZWDJGCZPY_PD) && M_RESULT_LAMP_ZJ.ZWDJGCZPY_PD.Trim() != Nothing && Convert.ToInt32(M_RESULT_LAMP_ZJ.ZWDJGCZPY_PD) > 0)
                            {
                                strTypeItem = "";
                                if (Convert.ToInt32(M_RESULT_LAMP_ZJ.ZWDJGCZPY_PD) == 2)
                                {
                                    strTypeItem = "YBX";
                                }

                                string strXZValue = M_RESULT_LAMP_ZJ.JGCZPYXZXX + FromTo + M_RESULT_LAMP_ZJ.JGCZPYXZSX;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key58"];
                                if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.JGCZPYXZXX.Trim()) || string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.JGCZPYXZSX.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key58"] = new Tuple<string, string, string, string, string, string>("58", "左外灯近光垂直偏移量(H)",
                                    M_RESULT_LAMP_ZJ.ZWDJGCZPY, strXZValue, GetPDResult(M_RESULT_LAMP_ZJ.ZWDJGCZPY_PD), strTypeItem);
                            }
                            if (!string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.ZWDJGSPPY_PD) && M_RESULT_LAMP_ZJ.ZWDJGSPPY_PD.Trim() != Nothing && Convert.ToInt32(M_RESULT_LAMP_ZJ.ZWDJGSPPY_PD) > 0)
                            {
                                string strData = "";
                                if (Convert.ToDecimal(M_RESULT_LAMP_ZJ.ZWDJGSPPYL) < 0)
                                {
                                    strData = "右" + Math.Abs(Convert.ToInt32(M_RESULT_LAMP_ZJ.ZWDJGSPPYL));
                                }
                                else
                                {
                                    strData = "左" + M_RESULT_LAMP_ZJ.ZWDJGSPPYL;
                                }

                                string strXZValue = "右" + M_RESULT_LAMP_ZJ.JGZDYPXZ + FromTo + "左" + M_RESULT_LAMP_ZJ.JGZDZPXZ;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key59"];
                                if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.JGZDYPXZ.Trim()) || string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.JGZDZPXZ.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }
                                if (bShowDGSPPY)
                                {
                                    dicTestItem["key59"] = new Tuple<string, string, string, string, string, string>("59", "左外灯近光水平偏移量",
                                        strData, strXZValue, NoAudit, "");
                                }
                            }
                            break;
                        case "H2": //左内灯
                            if (!string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.ZNDYGGQ_PD) && M_RESULT_LAMP_ZJ.ZNDYGGQ_PD.Trim() != Nothing && Convert.ToInt32(M_RESULT_LAMP_ZJ.ZNDYGGQ_PD) > 0)
                            {
                                strTypeItem = "";
                                if (Convert.ToInt32(M_RESULT_LAMP_ZJ.ZNDYGGQ_PD) == 2)
                                {
                                    strTypeItem = "GJX";
                                }

                                string strXZValue = MoreThan + M_RESULT_LAMP_ZJ.DGGQXZ;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key60"];
                                if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.DGGQXZ.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key60"] = new Tuple<string, string, string, string, string, string>("60", "左内灯远光光强(cd)",
                                    M_RESULT_LAMP_ZJ.ZNDYGGQ, strXZValue, GetPDResult(M_RESULT_LAMP_ZJ.ZNDYGGQ_PD), strTypeItem);
                            }
                            if (!string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.ZNDYGCZPY_PD) && M_RESULT_LAMP_ZJ.ZNDYGCZPY_PD.Trim() != Nothing && Convert.ToInt32(M_RESULT_LAMP_ZJ.ZNDYGCZPY_PD) > 0)
                            {
                                strTypeItem = "";
                                if (Convert.ToInt32(M_RESULT_LAMP_ZJ.ZNDYGCZPY_PD) == 2)
                                {
                                    strTypeItem = "YBX";
                                }

                                string strXZValue = M_RESULT_LAMP_ZJ.YGCZPYXZXX + FromTo + M_RESULT_LAMP_ZJ.YGCZPYXZSX;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key61"];
                                if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YGCZPYXZXX.Trim()) || string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YGCZPYXZSX.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }


                                dicTestItem["key61"] = new Tuple<string, string, string, string, string, string>("61", "左内灯远光垂直偏移量(H)",
                                    M_RESULT_LAMP_ZJ.ZNDYGCZPY, strXZValue, (Convert.ToInt32(M_RESULT_LAMP_ZJ.ZNDYGCZPY_PD) == 1) ? PassC : FailC, strTypeItem);
                            }
                            if (!string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.ZNDYGSPPY_PD) && M_RESULT_LAMP_ZJ.ZNDYGSPPY_PD.Trim() != Nothing && Convert.ToInt32(M_RESULT_LAMP_ZJ.ZNDYGSPPY_PD) > 0)
                            {
                                string strData = "";
                                if (Convert.ToDecimal(M_RESULT_LAMP_ZJ.ZNDYGSPPYL) < 0)
                                {
                                    strData = "右" + Math.Abs(Convert.ToInt32(M_RESULT_LAMP_ZJ.ZNDYGSPPYL));
                                }
                                else
                                {
                                    strData = "左" + M_RESULT_LAMP_ZJ.ZNDYGSPPYL;
                                }

                                string strXZValue = "右" + M_RESULT_LAMP_ZJ.YGZDZPXZ + FromTo + "左" + M_RESULT_LAMP_ZJ.YGZDYPXZ;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key62"];
                                if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YGZDZPXZ.Trim()) || string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YGZDYPXZ.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }
                                if (bShowDGSPPY)
                                {
                                    dicTestItem["key62"] = new Tuple<string, string, string, string, string, string>("62", "左内灯远光水平偏移量",
                                        M_RESULT_LAMP_ZJ.ZNDYGCZPY, strXZValue, NoAudit, "");
                                }
                            }
                            break;
                        case "H4": //右外灯
                            if (!string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YWDYGGQ_PD) && M_RESULT_LAMP_ZJ.YWDYGGQ_PD.Trim() != Nothing && Convert.ToInt32(M_RESULT_LAMP_ZJ.YWDYGGQ_PD) > 0)
                            {
                                strTypeItem = "";
                                if (Convert.ToInt32(M_RESULT_LAMP_ZJ.YWDYGGQ_PD) == 2)
                                {
                                    strTypeItem = "GJX";
                                }

                                string strXZValue = MoreThan + M_RESULT_LAMP_ZJ.DGGQXZ;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key63"];
                                if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.DGGQXZ.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key63"] = new Tuple<string, string, string, string, string, string>("63", "右外灯远光光强(cd)",
                                    M_RESULT_LAMP_ZJ.YWDYGGQ, strXZValue, GetPDResult(M_RESULT_LAMP_ZJ.YWDYGGQ_PD), strTypeItem);

                            }
                            if (!string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YWDYGCZPY_PD) && M_RESULT_LAMP_ZJ.YWDYGCZPY_PD.Trim() != Nothing && Convert.ToInt32(M_RESULT_LAMP_ZJ.YWDYGCZPY_PD) > 0)
                            {
                                strTypeItem = "";
                                if (Convert.ToInt32(M_RESULT_LAMP_ZJ.YWDYGCZPY_PD) == 2)
                                {
                                    strTypeItem = "YBX";
                                }

                                string strXZValue = M_RESULT_LAMP_ZJ.YGCZPYXZXX + FromTo + M_RESULT_LAMP_ZJ.YGCZPYXZSX;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key64"];
                                if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YGCZPYXZXX.Trim()) || string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YGCZPYXZSX.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key64"] = new Tuple<string, string, string, string, string, string>("64", "右外灯远光垂直偏移量(H)",
                                    M_RESULT_LAMP_ZJ.YWDYGCZPY, strXZValue, GetPDResult(M_RESULT_LAMP_ZJ.YWDYGCZPY_PD), strTypeItem);
                            }
                            if (!string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YWDYGSPPY_PD) && M_RESULT_LAMP_ZJ.YWDYGSPPY_PD.Trim() != Nothing && Convert.ToInt32(M_RESULT_LAMP_ZJ.YWDYGSPPY_PD) > 0)
                            {
                                string strData = "";
                                if (Convert.ToDecimal(M_RESULT_LAMP_ZJ.YWDYGSPPYL) < 0)
                                {
                                    strData = "右" + Math.Abs(Convert.ToInt32(M_RESULT_LAMP_ZJ.YWDYGSPPYL));
                                }
                                else
                                {
                                    strData = "左" + M_RESULT_LAMP_ZJ.YWDYGSPPYL;
                                }

                                string strXZValue = "右" + M_RESULT_LAMP_ZJ.YGYDYPXZ + FromTo + "左" + M_RESULT_LAMP_ZJ.YGYDZPXZ;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key65"];
                                if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YGYDYPXZ.Trim()) || string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YGYDZPXZ.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }
                                if (bShowDGSPPY)
                                {
                                    dicTestItem["key65"] = new Tuple<string, string, string, string, string, string>("65", "右外灯远光水平偏移量",
                                        strData, strXZValue, NoAudit, "");
                                }
                            }
                            if (!string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YWDJGCZPY_PD) && M_RESULT_LAMP_ZJ.YWDJGCZPY_PD.Trim() != Nothing && Convert.ToInt32(M_RESULT_LAMP_ZJ.YWDJGCZPY_PD) > 0)
                            {
                                strTypeItem = "";
                                if (Convert.ToInt32(M_RESULT_LAMP_ZJ.YWDJGCZPY_PD) == 2)
                                {
                                    strTypeItem = "YBX";
                                }

                                string strXZValue = M_RESULT_LAMP_ZJ.JGCZPYXZXX + FromTo + M_RESULT_LAMP_ZJ.JGCZPYXZSX;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key66"];
                                if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.JGCZPYXZXX.Trim()) || string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.JGCZPYXZSX.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key66"] = new Tuple<string, string, string, string, string, string>("66", "右外灯近光垂直偏移量(H)",
                                    M_RESULT_LAMP_ZJ.YWDJGCZPY, strXZValue, GetPDResult(M_RESULT_LAMP_ZJ.YWDJGCZPY_PD), strTypeItem);
                            }
                            if (!string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YWDJGSPPY_PD) && M_RESULT_LAMP_ZJ.YWDJGSPPY_PD.Trim() != Nothing && Convert.ToInt32(M_RESULT_LAMP_ZJ.YWDJGSPPY_PD) > 0)
                            {
                                string strData = "";
                                if (Convert.ToInt32(M_RESULT_LAMP_ZJ.YWDJGSPPYL) < 0)
                                {
                                    strData = "右" + Math.Abs(Convert.ToInt32(M_RESULT_LAMP_ZJ.YWDJGSPPYL));
                                }
                                else
                                {
                                    strData = "左" + M_RESULT_LAMP_ZJ.YWDJGSPPYL;
                                }

                                string strXZValue = "右" + M_RESULT_LAMP_ZJ.JGYDYPXZ + FromTo + "左" + M_RESULT_LAMP_ZJ.JGYDZPXZ;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key67"];
                                if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.JGYDYPXZ.Trim()) || string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.JGYDZPXZ.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                if (bShowDGSPPY)
                                {
                                    dicTestItem["key67"] = new Tuple<string, string, string, string, string, string>("67", "右外灯近光水平偏移量",
                                        strData, strXZValue, NoAudit, "");
                                }
                            }
                            break;
                        case "H3": //右内灯
                            if (!string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YNDYGGQ_PD) && M_RESULT_LAMP_ZJ.YNDYGGQ_PD.Trim() != Nothing && Convert.ToInt32(M_RESULT_LAMP_ZJ.YNDYGGQ_PD) > 0)
                            {
                                strTypeItem = "";
                                if (Convert.ToInt32(M_RESULT_LAMP_ZJ.YNDYGGQ_PD) == 2)
                                {
                                    strTypeItem = "GJX";
                                }

                                string strXZValue = MoreThan + M_RESULT_LAMP_ZJ.DGGQXZ;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key68"];
                                if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.DGGQXZ.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key68"] = new Tuple<string, string, string, string, string, string>("68", "右内灯远光光强(cd)",
                                    M_RESULT_LAMP_ZJ.YNDYGGQ, strXZValue, GetPDResult(M_RESULT_LAMP_ZJ.YNDYGGQ_PD), strTypeItem);
                            }
                            if (!string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YNDYGCZPY_PD) && M_RESULT_LAMP_ZJ.YNDYGCZPY_PD.Trim() != Nothing && Convert.ToInt32(M_RESULT_LAMP_ZJ.YNDYGCZPY_PD) > 0)
                            {
                                strTypeItem = "";
                                if (Convert.ToInt32(M_RESULT_LAMP_ZJ.YNDYGCZPY_PD) == 2)
                                {
                                    strTypeItem = "YBX";
                                }

                                string strXZValue = M_RESULT_LAMP_ZJ.YGCZPYXZXX + FromTo + M_RESULT_LAMP_ZJ.YGCZPYXZSX;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key69"];
                                if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YGCZPYXZXX.Trim()) || string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YGCZPYXZSX.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key69"] = new Tuple<string, string, string, string, string, string>("69", "右内灯远光垂直偏移量(H)",
                                    M_RESULT_LAMP_ZJ.YNDYGCZPY, strXZValue, (Convert.ToInt32(M_RESULT_LAMP_ZJ.YNDYGCZPY_PD) == 1) ? PassC : FailC, strTypeItem);
                            }
                            if (!string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YNDYGSPPY_PD) && M_RESULT_LAMP_ZJ.YNDYGSPPY_PD.Trim() != Nothing && Convert.ToInt32(M_RESULT_LAMP_ZJ.YNDYGSPPY_PD) > 0)
                            {
                                string strData = "";
                                if (Convert.ToInt32(M_RESULT_LAMP_ZJ.YNDYGSPPYL) < 0)
                                {
                                    strData = "右" + Math.Abs(Convert.ToInt32(M_RESULT_LAMP_ZJ.YNDYGSPPYL));
                                }
                                else
                                {
                                    strData = "左" + M_RESULT_LAMP_ZJ.YNDYGSPPYL;
                                }

                                string strXZValue = "右" + M_RESULT_LAMP_ZJ.YGYDZPXZ + FromTo + "左" + M_RESULT_LAMP_ZJ.YGYDYPXZ;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key70"];
                                if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YGYDZPXZ.Trim()) || string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YGYDYPXZ.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key70"] = new Tuple<string, string, string, string, string, string>("70", "右内灯远光水平偏移量",
                                   strData, strXZValue, NoAudit, "");
                            }
                            break;
                        case "S1": //速度
                            if (!string.IsNullOrEmpty(M_RESULT_SPEED.SD_PD) && Convert.ToInt32(M_RESULT_SPEED.SD_PD) > 0)
                            {
                                strTypeItem = "";
                                if (Convert.ToInt32(M_RESULT_SPEED.SD_PD) == 2)
                                {
                                    strTypeItem = "YBX";
                                }

                                string strXZValue = M_RESULT_SPEED.SDBZXX + FromTo + M_RESULT_SPEED.SDBZSX;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key71"];
                                if (string.IsNullOrEmpty(M_RESULT_SPEED.SDBZXX.Trim()) || string.IsNullOrEmpty(M_RESULT_SPEED.SDBZSX.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key71"] = new Tuple<string, string, string, string, string, string>("71", "车速表(km/h)",
                                    M_RESULT_SPEED.SCSD, strXZValue, GetPDResult(M_RESULT_SPEED.SD_PD), strTypeItem);
                            }
                            break;
                        case "L1": //喇叭声压级(dB)
                            if (!string.IsNullOrEmpty(M_RESULT_SPEAKER.SJZ_PD) && Convert.ToInt32(M_RESULT_SPEAKER.SJZ_PD) > 0)
                            {
                                strTypeItem = "";
                                if (Convert.ToInt32(M_RESULT_SPEAKER.SJZ_PD) == 2)
                                {
                                    strTypeItem = "GJX";
                                }

                                string strXZValue = M_RESULT_SPEAKER.SJXZXX + FromTo + M_RESULT_SPEAKER.SJXZSX;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key72"];
                                if (string.IsNullOrEmpty(M_RESULT_SPEAKER.SJXZXX.Trim()) || string.IsNullOrEmpty(M_RESULT_SPEAKER.SJXZSX.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key72"] = new Tuple<string, string, string, string, string, string>("72", "喇叭声压级(dB(A))",
                                    M_RESULT_SPEAKER.SCSJZ, strXZValue, GetPDResult(M_RESULT_SPEAKER.SJZ_PD), strTypeItem);

                            }
                            break;
                        case "U0": //悬架前轴
                            if (!string.IsNullOrEmpty(M_RESULT_SUSPENSION.QZZLXSLV_PD) && Convert.ToInt32(M_RESULT_SUSPENSION.QZZLXSLV_PD) > 0)
                            {
                                strTypeItem = "";
                                if (Convert.ToInt32(M_RESULT_SUSPENSION.QZZLXSLV_PD) == 2)
                                {
                                    strTypeItem = "YBX";
                                }

                                string strXZValue = MoreThan + M_RESULT_SUSPENSION.QZXSLVXZXX;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key73"];
                                if (string.IsNullOrEmpty(M_RESULT_SUSPENSION.QZXSLVXZXX.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key73"] = new Tuple<string, string, string, string, string, string>("73", "前轴左轮吸收率(%)",
                                    M_RESULT_SUSPENSION.QZZLXSLV, strXZValue, GetPDResult(M_RESULT_SUSPENSION.QZZLXSLV_PD), strTypeItem);
                            }
                            if (!string.IsNullOrEmpty(M_RESULT_SUSPENSION.QZYLXSLV_PD) && Convert.ToInt32(M_RESULT_SUSPENSION.QZYLXSLV_PD) > 0)
                            {
                                strTypeItem = "";
                                if (Convert.ToInt32(M_RESULT_SUSPENSION.QZYLXSLV_PD) == 2)
                                {
                                    strTypeItem = "YBX";
                                }

                                string strXZValue = MoreThan + M_RESULT_SUSPENSION.QZXSLVXZXX;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key74"];
                                if (string.IsNullOrEmpty(M_RESULT_SUSPENSION.QZXSLVXZXX.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key74"] = new Tuple<string, string, string, string, string, string>("74", "前轴右轮吸收率(%)",
                                   M_RESULT_SUSPENSION.QZYLXSLV, strXZValue, GetPDResult(M_RESULT_SUSPENSION.QZYLXSLV_PD), strTypeItem);
                            }
                            if (!string.IsNullOrEmpty(M_RESULT_SUSPENSION.QZXSLVC_PD) && Convert.ToInt32(M_RESULT_SUSPENSION.QZXSLVC_PD) > 0)
                            {
                                strTypeItem = "";
                                if (Convert.ToInt32(M_RESULT_SUSPENSION.QZXSLVC_PD) == 2)
                                {
                                    strTypeItem = "YBX";
                                }

                                string strXZValue = LessThan + M_RESULT_SUSPENSION.QZXSLVCXZSX;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key75"];
                                if (string.IsNullOrEmpty(M_RESULT_SUSPENSION.QZXSLVCXZSX.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key75"] = new Tuple<string, string, string, string, string, string>("75", "前轴吸收率差(%)",
                                    M_RESULT_SUSPENSION.QZXSLVC, strXZValue, GetPDResult(M_RESULT_SUSPENSION.QZXSLVC_PD), strTypeItem);
                            }
                            break;
                        case "U1": //悬架前轴
                            if (!string.IsNullOrEmpty(M_RESULT_SUSPENSION.HZZLXSLV_PD) && Convert.ToInt32(M_RESULT_SUSPENSION.HZZLXSLV_PD) > 0)
                            {
                                strTypeItem = "";
                                if (Convert.ToInt32(M_RESULT_SUSPENSION.HZZLXSLV_PD) == 2)
                                {
                                    strTypeItem = "YBX";
                                }

                                string strXZValue = MoreThan + M_RESULT_SUSPENSION.HZXSLVXZXX;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key76"];
                                if (string.IsNullOrEmpty(M_RESULT_SUSPENSION.HZXSLVXZXX.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key76"] = new Tuple<string, string, string, string, string, string>("76", "后轴左轮吸收率(%)",
                                    M_RESULT_SUSPENSION.HZZLXSLV, strXZValue, GetPDResult(M_RESULT_SUSPENSION.HZZLXSLV_PD), strTypeItem);
                            }
                            if (!string.IsNullOrEmpty(M_RESULT_SUSPENSION.HZYLXSLV_PD) && Convert.ToInt32(M_RESULT_SUSPENSION.HZYLXSLV_PD) > 0)
                            {
                                strTypeItem = "";
                                if (Convert.ToInt32(M_RESULT_SUSPENSION.HZYLXSLV_PD) == 2)
                                {
                                    strTypeItem = "YBX";
                                }

                                string strXZValue = MoreThan + M_RESULT_SUSPENSION.HZXSLVXZXX;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key77"];
                                if (string.IsNullOrEmpty(M_RESULT_SUSPENSION.HZXSLVXZXX.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key77"] = new Tuple<string, string, string, string, string, string>("77", "后轴右轮吸收率(%)",
                                    M_RESULT_SUSPENSION.HZYLXSLV, strXZValue, GetPDResult(M_RESULT_SUSPENSION.HZYLXSLV_PD), strTypeItem);
                            }
                            if (!string.IsNullOrEmpty(M_RESULT_SUSPENSION.HZXSLVC_PD) && Convert.ToInt32(M_RESULT_SUSPENSION.HZXSLVC_PD) > 0)
                            {
                                strTypeItem = "";
                                if (Convert.ToInt32(M_RESULT_SUSPENSION.HZXSLVC_PD) == 2)
                                {
                                    strTypeItem = "YBX";
                                }

                                string strXZValue = LessThan + M_RESULT_SUSPENSION.HZXSLVCXZSX;
                                Tuple<string, string, string, string, string, string> tpCur = dicTestItem["key78"];
                                if (string.IsNullOrEmpty(M_RESULT_SUSPENSION.HZXSLVCXZSX.Trim()))
                                {
                                    strXZValue = tpCur.Item4;
                                }

                                dicTestItem["key78"] = new Tuple<string, string, string, string, string, string>("78", "后轴吸收率差(%)",
                                    M_RESULT_SUSPENSION.HZXSLVC, strXZValue, GetPDResult(M_RESULT_SUSPENSION.HZXSLVC_PD), strTypeItem);
                            }
                            break;
                    }
                }

        }

        /// <summary>
        /// 返回技术等级判定
        /// </summary>
        /// <param name="fZDL">制动力</param>
        /// <param name="fBPHLV">不平衡率</param>
        /// <param name="iPD">判定</param>
        /// <returns>结果</returns>
        private string[] GetPDResultDJ(float fBPHLV, int iPD, bool bQZ, bool bGJX)
        {
            string[] strRet = new string[2];
            if (bJSDJPD)
            {
                if (iPD == 1)
                {
                    if (bQZ)
                    {
                        if (fBPHLV <= 20)
                        {
                            strRet[0] = Level1;
                            strRet[1] = "YJX";
                        }
                        else
                        {
                            strRet[0] = Level2;
                            strRet[1] = "EJX";

                        }
                    }
                    else
                    {
                        if (fBPHLV <= 24)
                        {
                            strRet[0] = Level1;
                            strRet[1] = "YJX";
                        }
                        else
                        {
                            strRet[0] = Level2;
                            strRet[1] = "EJX";
                        }
                    }
                }
                else if (iPD == 10)
                {
                    strRet[0] = Level1;
                    strRet[1] = "YJX";
                }
                else if (iPD == 11)
                {
                    strRet[0] = Level2;
                    strRet[1] = "EJX";
                }
                else
                {
                    strRet[0] = FailC;
                    if (bGJX)
                    {
                        strRet[1] = "GJX";
                    }
                    else
                    {
                        strRet[1] = "YBX";
                    }
                }
            }
            else
            {
                if (iPD == 1)
                {
                    strRet[0] = PassC;
                    strRet[1] = "";
                }
                else {
                    strRet[0] = FailC;
                    if (bGJX)
                    {
                        strRet[1] = "GJX";
                    }
                    else
                    {
                        strRet[1] = "YBX";
                    }
                }
            }
            return strRet;
        }

        /// <summary>
        /// 根据不同类型得到检测流水号
        /// </summary>
        /// <param name="strType">X1,X3,X4,X5,X6</param>
        /// <returns></returns>
        private string GetPQJCLSH(string strType)
        {
            string strJCLSH = "";
            try
            {
                bool bJYXM = GetJYXM().Contains(strType);
                if (bJYXM)
                {
                    int iMonth = 0;
                    CONST_DEFINE_WEB_BLL web_bll = new CONST_DEFINE_WEB_BLL();
                    var web = web_bll.GetModelList("Code='FJRQ'");
                    if (web.Length > 0)
                    {
                        iMonth = Convert.ToInt32(web[0].ValueOfName);
                    }

                    VEHICLE_DISPATCH_BLL bll = new VEHICLE_DISPATCH_BLL();
                    string strVehicleID = Vehicle_Info.HPZLDH + Vehicle_Info.HPHM;
                    var vInfo = bll.GetModelList("VEHICLEID ='" + strVehicleID + "' and substring(JCLSH,1,1)='P' and JYXM='" + strType + ",' and JCZT_STATUS=4 and DATEADD(M," + iMonth + ",GXRQ)>GETDATE() order by ID desc");
                    if (vInfo.Length > 0)
                    {
                        strJCLSH = vInfo[0].JCLSH;
                    }
                }
            }
            catch (Exception ex)
            {
 
            }

            return strJCLSH;
        }

        #region 仪器部分
        /// <summary>
        /// 得到综检仪器的基础信息部分
        /// </summary>
        /// <param name="dtBase"></param>
        /// <returns></returns>
        public DataTable GetDataTableYQ_Base(DataTable dtBase)
        {
            DataRow drBase = dtBase.NewRow();
            drBase["JCLSH"] = JCLSH;
            if (IsGC == false)   //非挂车  汽车列车
            {
                drBase["ZC_HPHM"] = Vehicle_Info.HPHM;
                drBase["ZC_HPZL"] = Vehicle_Info.HPZL;
                drBase["FDJH"] = Vehicle_Info.FDJH;
                drBase["LJXSLC"] = Vehicle_Info.LJXSLC;
                drBase["QDXS"] = Vehicle_Info.QDXS;
                drBase["ZXZXJXS"] = Vehicle_Info.ZXZXJXS;
                drBase["RLLB"] = Vehicle_Info.RLLB;
                drBase["LTGGLX"] = Vehicle_Info.LTGGLX;
                drBase["YZLJ"] = Vehicle_Info.YZLJ;
                drBase["KCLXDJ"] = Vehicle_Info.KCLXDJ;
                drBase["HCCSXS"] = Vehicle_Info.HCCSXS;
                drBase["QDZS"] = QDZSL;
                drBase["QDZKZZL"] = Vehicle_Info.QDZKZZL;
                drBase["BZZXS"] = Vehicle_Info.BZZXS;
                drBase["ZXZLX"] = Vehicle_Info.ZXZLXDH;
                drBase["QZDZ"] = Vehicle_Info.QZDZ;
                drBase["CYS"] = Vehicle_Info.CYS;
                drBase["ZZS"] = Vehicle_Info.ZZS;
                drBase["YGGSNFKT"] = Vehicle_Info.YGGSNFKT;
                drBase["WKCC_DC"] = Vehicle_Info.CSC + "×" + Vehicle_Info.CSK + "×" + Vehicle_Info.CSG;
                
                if (IsHC == false)
                {
                    drBase["CSC"] = Vehicle_Info.CSC;
                    drBase["CXLBGD_DC"] = Nothing;
                }
                else
                {//货车
                    drBase["CSC"] = Nothing;
                    if (string.IsNullOrEmpty(Vehicle_Info.ZCLBGD) == false)
                    {
                        drBase["CXLBGD_DC"] = Vehicle_Info.ZCLBGD;
                    }
                    else
                    {
                        drBase["CXLBGD_DC"] = Nothing;
                    }
                }

                if (IsQYC)
                {
                    drBase["HDZH"] = Vehicle_Info.HDZH;
                }
                else
                {
                    drBase["HDZH"] = Nothing;
                }

                if (IsQYC)
                {
                    drBase["EDGL"] = Nothing;
                    drBase["EDNJ"] = Vehicle_Info.EDNJ;
                    drBase["EDNJZS"] = Vehicle_Info.EDNJZS;
                }
                else if (IsCYC)
                {
                    drBase["EDGL"] = Vehicle_Info.EDGL;
                    drBase["EDNJ"] = Nothing;
                    drBase["EDNJZS"] = Nothing;
                }

                if (IsQCLC == false)
                {
                    drBase["GC_HPHM"] = Nothing;
                    drBase["GC_CLZL"] = Nothing;
                    drBase["GCZS"] = Nothing;

                    drBase["WKCC_GC"] = Nothing;
                    drBase["CXLBGD_GC"] = Nothing;
                }
                else
                {
                    drBase["GC_HPHM"] = Vehicle_Info_GLC.HPHM;
                    drBase["GC_CLZL"] = Vehicle_Info_GLC.CLZL;
                    drBase["GCZS"] = Vehicle_Info_GLC.ZZS;

                    drBase["WKCC_GC"] = Vehicle_Info_GLC.CSC + "×" + Vehicle_Info_GLC.CSK + "×" + Vehicle_Info_GLC.CSG;
                    drBase["CXLBGD_GC"] = Vehicle_Info_GLC.GCLBGD == Empty ? Nothing : Vehicle_Info_GLC.GCLBGD;
                }
            }
            else
            {//挂车
                drBase["GC_HPHM"] = Vehicle_Info.HPHM;
                drBase["GC_CLZL"] = Vehicle_Info.CLZL;
                drBase["ZC_HPHM"] = Nothing;
                drBase["ZC_HPZL"] = Nothing;
                drBase["GCZS"] = Vehicle_Info.ZZS;
                drBase["FDJH"] = Nothing;
                drBase["LJXSLC"] = Nothing;
                drBase["QDXS"] = Nothing;
                drBase["ZXZXJXS"] = Nothing;
                drBase["RLLB"] = Nothing;
                drBase["LTGGLX"] = Nothing;
                drBase["YZLJ"] = Nothing;
                drBase["CSC"] = Nothing;
                drBase["KCLXDJ"] = Nothing;
                drBase["HCCSXS"] = Nothing;
                drBase["QDZS"] = Nothing;
                drBase["QDZKZZL"] = Nothing;
                drBase["HDZH"] = Nothing;
                drBase["BZZXS"] = Nothing;
                drBase["ZXZLX"] = Nothing;
                drBase["QZDZ"] = Nothing;
                drBase["CYS"] = Nothing;
                drBase["ZZS"] = Nothing;
                drBase["YGGSNFKT"] = Nothing;
                drBase["CXLBGD_DC"] = Nothing;
                drBase["WKCC_DC"] = Nothing;
                drBase["WKCC_GC"] = Vehicle_Info.CSC + "×" + Vehicle_Info.CSK + "×" + Vehicle_Info.CSG;
                drBase["CXLBGD_GC"] = Vehicle_Info.GCLBGD == Empty ? Nothing : Vehicle_Info.GCLBGD;
            }

            drBase["ZZL"] = Vehicle_Info.ZZL;
            drBase["CSG"] = Vehicle_Info.CSG;
            drBase["SYR"] = Vehicle_Info.SYR == Empty ? Nothing : Vehicle_Info.SYR;
            drBase["YYZH"] = Vehicle_Info.YYZH;
            drBase["JYLB"] = Vehicle_Info.JYLB == Empty ? Nothing : Vehicle_Info.JYLB;
            drBase["YWLX"] = Vehicle_Info.YWLX == Empty ? Nothing : Vehicle_Info.YWLX;
            drBase["JCXHSTR"] = Vehicle_Info.JCXH;
            if (Vehicle_Info.JCXH == 1)
            {
                drBase["JCXHSTR"] = "A";
            }
            else if (Vehicle_Info.JCXH == 2)
            {
                drBase["JCXHSTR"] = "B";
            }
            else if (Vehicle_Info.JCXH == 3)
            {
                drBase["JCXHSTR"] = "C";
            }
            drBase["CLXXSJ"] = Vehicle_Info.CLXXSJ;
            if (bShowAllJCLSH)
            {
                drBase["ZJLSH"] = Vehicle_Info.ZJLSH;
            }
            else
            {
                drBase["ZJLSH"] = Vehicle_Info.ZJLSH;
            }
            drBase["CCRQ"] = Convert.ToDateTime(Vehicle_Info.CCRQ).ToString("yyyy-MM-dd");
            drBase["CCDJRQ"] = Convert.ToDateTime(Vehicle_Info.CCDJRQ).ToString("yyyy-MM-dd");
            drBase["VIN"] = Vehicle_Info.VIN;
            drBase["CLZL"] = Vehicle_Info.XH;

            drBase["CSYS"] = Vehicle_Info.CSYS == Empty ? Nothing : Vehicle_Info.CSYS;
           

            string strZCZWZ = Vehicle_Info.ZCZWZ;
            if (string.IsNullOrEmpty(strZCZWZ) == false)
            {
                drBase["ZCZWZ"] = strZCZWZ.Substring(0, strZCZWZ.Length - 1);
            }
            else
            {
                drBase["ZCZWZ"] = Nothing;
            }

            dtBase.Rows.Add(drBase);
            return dtBase;
        }

        /// <summary>
        /// 得到综检仪器的仪器检验部分数据
        /// </summary>
        /// <param name="ds"></param>
        /// <returns></returns>
        public List<DataTable> GetDataTablesYQ_XN(DataSet ds)
        {
            List<DataTable> lstDt = new List<DataTable>();
            DataTable dtDPCG = ds.Tables["dtDPCG"];
            DataTable dtBrake = ds.Tables["dtBrake"];
            DataTable dtBrakeD = ds.Tables["dtBrakeD"];
            DataTable dtLS = ds.Tables["dtLS"];
            DataTable dtPF = ds.Tables["dtPF"];
            DataTable dtXJ = ds.Tables["dtXJ"];
            DataTable dtLamp = ds.Tables["dtLamp"];
            DataTable dtOthers = ds.Tables["dtOthers"];

            DataRow drDPCG = ds.Tables["dtDPCG"].NewRow();
            DataRow drBrake = ds.Tables["dtBrake"].NewRow();
            DataRow drBrakeD = ds.Tables["dtBrakeD"].NewRow();
            DataRow drLS = ds.Tables["dtLS"].NewRow();
            DataRow drPF = ds.Tables["dtPF"].NewRow();
            DataRow drXJ = ds.Tables["dtXJ"].NewRow();
            DataRow drLamp = ds.Tables["dtLamp"].NewRow();
            DataRow drOthers = ds.Tables["dtOthers"].NewRow();

            drDPCG = SetDataTableDefaultValue(ref dtDPCG, Nothing);
            drBrake = SetDataTableDefaultValue(ref dtBrake, Nothing);
            drBrakeD = SetDataTableDefaultValue(ref dtBrakeD, Nothing);
            drLS = SetDataTableDefaultValue(ref dtLS, Nothing);
            drPF = SetDataTableDefaultValue(ref dtPF, Nothing);
            drXJ = SetDataTableDefaultValue(ref dtXJ, Nothing);
            drLamp = SetDataTableDefaultValue(ref dtLamp, Nothing);
            drOthers = SetDataTableDefaultValue(ref dtOthers, Nothing);

            RESULT_DPCG_BLL dpcg_bll = new RESULT_DPCG_BLL();
            RESULT_BRAKE_ZJ_BLL brake_bll = new RESULT_BRAKE_ZJ_BLL();
            RESULT_ROAD_BLL road_bll = new RESULT_ROAD_BLL();
            RESULT_SDS_BLL sds_bll = new RESULT_SDS_BLL();
            RESULT_VMAS_BLL vmas_bll = new RESULT_VMAS_BLL();
            RESULT_ASM_BLL asm_BLL = new RESULT_ASM_BLL();
            RESULT_ZYJS_BLL zyjs_bll = new RESULT_ZYJS_BLL();
            RESULT_LD_BLL ld_bll = new RESULT_LD_BLL();
            RESULT_LAMP_ZJ_BLL lamp_bll = new RESULT_LAMP_ZJ_BLL();
            RESULT_SUSPENSION_BLL suspension_bll = new RESULT_SUSPENSION_BLL();
            RESULT_IMAGE_BLL image_bll = new RESULT_IMAGE_BLL();
            RESULT_SPEED_BLL speed_bll = new RESULT_SPEED_BLL();
            RESULT_SIDESLIP_BLL sideslip_bll = new RESULT_SIDESLIP_BLL();
            RESULT_SPEAKER_BLL speaker_bll = new RESULT_SPEAKER_BLL();
            RESULT_VEHICLE_INFO_BLL vehicle_bll = new RESULT_VEHICLE_INFO_BLL();

            RESULT_DPCG M_RESULT_DPCG = new RESULT_DPCG();
            RESULT_DPCG T_RESULT_DPCG = new RESULT_DPCG();
            RESULT_BRAKE_ZJ M_RESULT_BRAKE_ZJ = new RESULT_BRAKE_ZJ();
            RESULT_BRAKE_ZJ T_RESULT_BRAKE_ZJ = new RESULT_BRAKE_ZJ();
            RESULT_ROAD M_RESULT_ROAD = new RESULT_ROAD();
            RESULT_ROAD T_RESULT_ROAD = new RESULT_ROAD();
            RESULT_SDS M_RESULT_SDS = new RESULT_SDS();
            RESULT_SDS T_RESULT_SDS = new RESULT_SDS();
            RESULT_VMAS M_RESULT_VMAS = new RESULT_VMAS();
            RESULT_VMAS T_RESULT_VMAS = new RESULT_VMAS();
            RESULT_ASM M_RESULT_ASM = new RESULT_ASM();
            RESULT_ASM T_RESULT_ASM = new RESULT_ASM();
            RESULT_ZYJS M_RESULT_ZYJS = new RESULT_ZYJS();
            RESULT_ZYJS T_RESULT_ZYJS = new RESULT_ZYJS();
            RESULT_LD M_RESULT_LD = new RESULT_LD();
            RESULT_LD T_RESULT_LD = new RESULT_LD();
            RESULT_LAMP_ZJ M_RESULT_LAMP_ZJ = new RESULT_LAMP_ZJ();
            RESULT_LAMP_ZJ T_RESULT_LAMP_ZJ = new RESULT_LAMP_ZJ();
            RESULT_SUSPENSION M_RESULT_SUSPENSION = new RESULT_SUSPENSION();
            RESULT_SUSPENSION T_RESULT_SUSPENSION = new RESULT_SUSPENSION();
            RESULT_IMAGE M_RESULT_IMAGE = new RESULT_IMAGE();
            RESULT_IMAGE T_RESULT_IMAGE = new RESULT_IMAGE();
            RESULT_SPEED M_RESULT_SPEED = new RESULT_SPEED();
            RESULT_SPEED T_RESULT_SPEED = new RESULT_SPEED();
            RESULT_SIDESLIP M_RESULT_SIDESLIP = new RESULT_SIDESLIP();
            RESULT_SIDESLIP T_RESULT_SIDESLIP = new RESULT_SIDESLIP();
            RESULT_SPEAKER M_RESULT_SPEAKER = new RESULT_SPEAKER();
            RESULT_SPEAKER T_RESULT_SPEAKER = new RESULT_SPEAKER();

            ModelReflection mR = new ModelReflection();

            for (int i = 0; i < lstJCLSH.Count; i++)
            {
                T_RESULT_DPCG = dpcg_bll.GetModel(lstJCLSH[i]);
                T_RESULT_BRAKE_ZJ = brake_bll.GetModel(lstJCLSH[i]);
                T_RESULT_ROAD = road_bll.GetModel(lstJCLSH[i]);
                T_RESULT_SDS = sds_bll.GetModel(lstJCLSH[i]);
                T_RESULT_VMAS = vmas_bll.GetModel(lstJCLSH[i]);
                T_RESULT_ASM = asm_BLL.GetModel(lstJCLSH[i]);
                T_RESULT_ZYJS = zyjs_bll.GetModel(lstJCLSH[i]);
                T_RESULT_LD = ld_bll.GetModel(lstJCLSH[i]);
                T_RESULT_LAMP_ZJ = lamp_bll.GetModel(lstJCLSH[i]);
                T_RESULT_SUSPENSION = suspension_bll.GetModel(lstJCLSH[i]);
                T_RESULT_IMAGE = image_bll.GetModel(lstJCLSH[i]);
                T_RESULT_SPEED = speed_bll.GetModel(lstJCLSH[i]);
                T_RESULT_SIDESLIP = sideslip_bll.GetModel(lstJCLSH[i]);
                T_RESULT_SPEAKER = speaker_bll.GetModel(lstJCLSH[i]);

                if (i == 0)
                {
                    M_RESULT_DPCG = T_RESULT_DPCG;
                    M_RESULT_BRAKE_ZJ = T_RESULT_BRAKE_ZJ;
                    M_RESULT_ROAD = T_RESULT_ROAD;
                    M_RESULT_SDS = T_RESULT_SDS;
                    M_RESULT_VMAS = T_RESULT_VMAS;
                    M_RESULT_ASM = T_RESULT_ASM;
                    M_RESULT_ZYJS = T_RESULT_ZYJS;
                    M_RESULT_LD = T_RESULT_LD;
                    M_RESULT_LAMP_ZJ = T_RESULT_LAMP_ZJ;
                    M_RESULT_SUSPENSION = T_RESULT_SUSPENSION;
                    M_RESULT_IMAGE = T_RESULT_IMAGE;
                    M_RESULT_SPEED = T_RESULT_SPEED;
                    M_RESULT_SIDESLIP = T_RESULT_SIDESLIP;
                    M_RESULT_SPEAKER = T_RESULT_SPEAKER;
                }

                mR.AutoMapping(T_RESULT_DPCG, M_RESULT_DPCG);
                mR.AutoMapping(T_RESULT_BRAKE_ZJ, M_RESULT_BRAKE_ZJ);
                mR.AutoMapping(T_RESULT_ROAD, M_RESULT_ROAD);
                mR.AutoMapping(T_RESULT_SDS, M_RESULT_SDS);
                mR.AutoMapping(T_RESULT_VMAS, M_RESULT_VMAS);
                mR.AutoMapping(T_RESULT_ASM, M_RESULT_ASM);
                mR.AutoMapping(T_RESULT_ZYJS, M_RESULT_ZYJS);
                mR.AutoMapping(T_RESULT_LD, M_RESULT_LD);
                mR.AutoMapping(T_RESULT_LAMP_ZJ, M_RESULT_LAMP_ZJ);
                mR.AutoMapping(T_RESULT_SUSPENSION, M_RESULT_SUSPENSION);
                mR.AutoMapping(T_RESULT_IMAGE, M_RESULT_IMAGE);
                mR.AutoMapping(T_RESULT_SPEED, M_RESULT_SPEED);
                mR.AutoMapping(T_RESULT_SIDESLIP, M_RESULT_SIDESLIP);
                mR.AutoMapping(T_RESULT_SPEAKER, M_RESULT_SPEAKER);
            }

            #region dtDPCG
            if (IsNewVehicle && bJSDJPD)
            {
                drDPCG["GK_DBGL"] = Check;
                drDPCG["GK_EDCS"] = Check;
                drDPCG["GK_JZL"] = Check;
                drDPCG["GK_WDCS"] = Check;
                drDPCG["GK_PD"] = Level1;

                drDPCG["YH_BZ"] = Check;
                drDPCG["YH_SCZ"] = Check;
                if (IsNewVehicle && (RLLBDH == "A" || RLLBDH == "B") && ZZL > 3500)
                {
                    drDPCG["YH_PD"] = Pass;
                }
                else
                {
                    drDPCG["YH_PD"] = NoAudit;
                }
            }
            else
            {
                if (!string.IsNullOrEmpty(M_RESULT_DPCG.GK_PD))
                {
                    drDPCG["GK_DBGL"] = M_RESULT_DPCG.GK_DBGL;
                    drDPCG["GK_EDCS"] = M_RESULT_DPCG.GK_EDCS;
                    drDPCG["GK_JZL"] = M_RESULT_DPCG.GK_JZL;
                    if (M_RESULT_DPCG.GK_PD.Trim() == "2")
                    {
                        drDPCG["GK_WDCS"] = M_RESULT_DPCG.GK_WDCS + FlagFails;
                        if (!dicYQFailItems.ContainsKey("GK_WDCS"))
                        {
                            dicYQFailItems.Add("GK_WDCS", "动力性稳定车速不合格、");
                        }
                        else
                        {
                            dicYQFailItems["GK_WDCS"] = "动力性稳定车速不合格、";
                        }
                    }
                    else
                    {
                        drDPCG["GK_WDCS"] = M_RESULT_DPCG.GK_WDCS;
                        if (dicYQFailItems.ContainsKey("GK_WDCS"))
                        {
                            dicYQFailItems["GK_WDCS"] = "";
                        }
                    }

                    if (!bJSDJPD)
                    {
                        drDPCG["GK_PD"] = GetPDResult(M_RESULT_DPCG.GK_PD);
                    }
                    else
                    {
                        drDPCG["GK_PD"] = GetPDResultDJ(M_RESULT_DPCG.GK_PD);
                    }
                }

                if (!string.IsNullOrEmpty(M_RESULT_DPCG.YH_PD))
                {
                    drDPCG["YH_BZ"] = M_RESULT_DPCG.YH_BZ;
                    if (M_RESULT_DPCG.YH_PD.Trim() == "2")
                    {
                        drDPCG["YH_SCZ"] = M_RESULT_DPCG.YH_SCZ + FlagFails;
                        if (!dicYQFailItems.ContainsKey("YH_SCZ"))
                        {
                            dicYQFailItems.Add("YH_SCZ", "燃料经济型实测值不合格、");
                        }
                        else
                        {
                            dicYQFailItems["YH_SCZ"] = "燃料经济型实测值不合格、";
                        }
                    }
                    else
                    {
                        drDPCG["YH_SCZ"] = M_RESULT_DPCG.YH_SCZ;
                        if (dicYQFailItems.ContainsKey("YH_SCZ"))
                        {
                            dicYQFailItems["YH_SCZ"] = "";
                        }
                    }
                    drDPCG["YH_PD"] = GetPDResult(M_RESULT_DPCG.YH_PD);
                }
            }
            dtDPCG.Rows.Add(drDPCG);
            #endregion

            #region dtBrake
            #region 一轴
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.YZZLZ))
            {
                drBrake["YZZLZ"] = M_RESULT_BRAKE_ZJ.YZZLZ;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.YZYLZ))
            {
                drBrake["YZYLZ"] = M_RESULT_BRAKE_ZJ.YZYLZ;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.FHTYZZZ))
            {
                drBrake["FHTYZZZ"] = M_RESULT_BRAKE_ZJ.FHTYZZZ;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.YZZZDZDL))
            {
                drBrake["YZZZDZDL"] = M_RESULT_BRAKE_ZJ.YZZZDZDL;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.YZYZDZDL))
            {
                drBrake["YZYZDZDL"] = M_RESULT_BRAKE_ZJ.YZYZDZDL;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.YZZSZDL))
            {
                drBrake["YZZSZDL"] = M_RESULT_BRAKE_ZJ.YZZSZDL;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.YZYSZDL))
            {
                drBrake["YZYSZDL"] = M_RESULT_BRAKE_ZJ.YZYSZDL;
            }
            #endregion

            #region 二轴
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.EZZLZ))
            {
                drBrake["EZZLZ"] = M_RESULT_BRAKE_ZJ.EZZLZ;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.EZYLZ))
            {
                drBrake["EZYLZ"] = M_RESULT_BRAKE_ZJ.EZYLZ;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.FHTEZZZ))
            {
                drBrake["FHTEZZZ"] = M_RESULT_BRAKE_ZJ.FHTEZZZ;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.EZZZDZDL))
            {
                drBrake["EZZZDZDL"] = M_RESULT_BRAKE_ZJ.EZZZDZDL;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.EZYZDZDL))
            {
                drBrake["EZYZDZDL"] = M_RESULT_BRAKE_ZJ.EZYZDZDL;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.EZZSZDL))
            {
                drBrake["EZZSZDL"] = M_RESULT_BRAKE_ZJ.EZZSZDL;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.EZYSZDL))
            {
                drBrake["EZYSZDL"] = M_RESULT_BRAKE_ZJ.EZYSZDL;
            }
            #endregion

            #region 三轴
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SZZLZ))
            {
                drBrake["SZZLZ"] = M_RESULT_BRAKE_ZJ.SZZLZ;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SZYLZ))
            {
                drBrake["SZYLZ"] = M_RESULT_BRAKE_ZJ.SZYLZ;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.FHTSZZZ))
            {
                drBrake["FHTSZZZ"] = M_RESULT_BRAKE_ZJ.FHTSZZZ;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SZZZDZDL))
            {
                drBrake["SZZZDZDL"] = M_RESULT_BRAKE_ZJ.SZZZDZDL;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SZYZDZDL))
            {
                drBrake["SZYZDZDL"] = M_RESULT_BRAKE_ZJ.SZYZDZDL;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SZZSZDL))
            {
                drBrake["SZZSZDL"] = M_RESULT_BRAKE_ZJ.SZZSZDL;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SZYSZDL))
            {
                drBrake["SZYSZDL"] = M_RESULT_BRAKE_ZJ.SZYSZDL;
            }
            #endregion

            #region 四轴
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SIZZLZ))
            {
                drBrake["SIZZLZ"] = M_RESULT_BRAKE_ZJ.SIZZLZ;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SIZYLZ))
            {
                drBrake["SIZYLZ"] = M_RESULT_BRAKE_ZJ.SIZYLZ;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.FHTSIZZZ))
            {
                drBrake["FHTSIZZZ"] = M_RESULT_BRAKE_ZJ.FHTSIZZZ;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SIZZZDZDL))
            {
                drBrake["SIZZZDZDL"] = M_RESULT_BRAKE_ZJ.SIZZZDZDL;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SIZYZDZDL))
            {
                drBrake["SIZYZDZDL"] = M_RESULT_BRAKE_ZJ.SIZYZDZDL;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SIZZSZDL))
            {
                drBrake["SIZZSZDL"] = M_RESULT_BRAKE_ZJ.SIZZSZDL;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SIZYSZDL))
            {
                drBrake["SIZYSZDL"] = M_RESULT_BRAKE_ZJ.SIZYSZDL;
            }
            #endregion

            #region 五轴
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.WZZLZ))
            {
                drBrake["WZZLZ"] = M_RESULT_BRAKE_ZJ.WZZLZ;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.WZYLZ))
            {
                drBrake["WZYLZ"] = M_RESULT_BRAKE_ZJ.WZYLZ;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.FHTWZZZ))
            {
                drBrake["FHTWZZZ"] = M_RESULT_BRAKE_ZJ.FHTWZZZ;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.WZZZDZDL))
            {
                drBrake["WZZZDZDL"] = M_RESULT_BRAKE_ZJ.WZZZDZDL;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.WZYZDZDL))
            {
                drBrake["WZYZDZDL"] = M_RESULT_BRAKE_ZJ.WZYZDZDL;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.WZZSZDL))
            {
                drBrake["WZZSZDL"] = M_RESULT_BRAKE_ZJ.WZZSZDL;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.WZYSZDL))
            {
                drBrake["WZYSZDL"] = M_RESULT_BRAKE_ZJ.WZYSZDL;
            }
            #endregion

            #region 六轴
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.LZZLZ))
            {
                drBrake["LZZLZ"] = M_RESULT_BRAKE_ZJ.LZZLZ;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.LZYLZ))
            {
                drBrake["LZYLZ"] = M_RESULT_BRAKE_ZJ.LZYLZ;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.FHTLZZZ))
            {
                drBrake["FHTLZZZ"] = M_RESULT_BRAKE_ZJ.FHTLZZZ;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.LZZZDZDL))
            {
                drBrake["LZZZDZDL"] = M_RESULT_BRAKE_ZJ.LZZZDZDL;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.LZYZDZDL))
            {
                drBrake["LZYZDZDL"] = M_RESULT_BRAKE_ZJ.LZYZDZDL;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.LZZSZDL))
            {
                drBrake["LZZSZDL"] = M_RESULT_BRAKE_ZJ.LZZSZDL;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.LZYSZDL))
            {
                drBrake["LZYSZDL"] = M_RESULT_BRAKE_ZJ.LZYSZDL;
            }
            #endregion

            #region 整车
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.ZCZZ))
            {
                drBrake["ZCZZ"] = M_RESULT_BRAKE_ZJ.ZCZZ;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.ZCZDLV))
            {
                drBrake["ZCZDLV"] = M_RESULT_BRAKE_ZJ.ZCZDLV;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.ZCZDLV_PD))
            {
                if (M_RESULT_BRAKE_ZJ.ZCZDLV_PD == "2")
                {
                    drBrake["ZCZDLV"] = M_RESULT_BRAKE_ZJ.ZCZDLV + FlagFails;
                    if (!dicYQFailItems.ContainsKey("ZCZDLV"))
                    {
                        dicYQFailItems.Add("ZCZDLV", "整车制动率不合格、");
                    }
                    else
                    {
                        dicYQFailItems["ZCZDLV"] = "整车制动率不合格、";
                    }
                }
                else
                {
                    drBrake["ZCZDLV"] = M_RESULT_BRAKE_ZJ.ZCZDLV;
                    if (dicYQFailItems.ContainsKey("ZCZDLV"))
                    {
                        dicYQFailItems["ZCZDLV"] = "";
                    }
                }
                drBrake["ZCZDLV_PD"] = GetPDResult(M_RESULT_BRAKE_ZJ.ZCZDLV_PD);
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SZDLV_PD))
            {
                if (M_RESULT_BRAKE_ZJ.SZDLV_PD == "2")
                {
                    drBrake["ZCSZDLV"] = M_RESULT_BRAKE_ZJ.ZCSZDLV + FlagFails;
                    if (!dicYQFailItems.ContainsKey("ZCSZDLV"))
                    {
                        dicYQFailItems.Add("ZCSZDLV", "驻车制动率不合格、");
                    }
                    else
                    {
                        dicYQFailItems["ZCSZDLV"] = "驻车制动率不合格、";
                    }
                }
                else
                {
                    drBrake["ZCSZDLV"] = M_RESULT_BRAKE_ZJ.ZCSZDLV;
                    if (dicYQFailItems.ContainsKey("ZCSZDLV"))
                    {
                        dicYQFailItems["ZCSZDLV"] = "";
                    }
                }
                drBrake["SZDLV_PD"] = GetPDResult(M_RESULT_BRAKE_ZJ.SZDLV_PD);
            }

            #endregion
            dtBrake.Rows.Add(drBrake);
            #endregion

            #region dtBrakeD
            #region 一轴
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.YZZDLV))
            {
                if (M_RESULT_BRAKE_ZJ.YZZDLV_PD == "2")
                {
                    drBrakeD["YZZDLV"] = M_RESULT_BRAKE_ZJ.YZZDLV + FlagFails;
                    if (!dicYQFailItems.ContainsKey("YZZDLV"))
                    {
                        dicYQFailItems.Add("YZZDLV", "一轴制动率不合格、");
                    }
                    else
                    {
                        dicYQFailItems["YZZDLV"] = "一轴制动率不合格、";
                    }
                }
                else
                {
                    drBrakeD["YZZDLV"] = M_RESULT_BRAKE_ZJ.YZZDLV;
                    if (dicYQFailItems.ContainsKey("YZZDLV"))
                    {
                        dicYQFailItems["YZZDLV"] = "";
                    }
                }
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.YZBPHLV))
            {
                if (M_RESULT_BRAKE_ZJ.YZBPHLV_PD == "2")
                {
                    drBrakeD["YZBPHLV"] = M_RESULT_BRAKE_ZJ.YZBPHLV + FlagFails;
                    if (!dicYQFailItems.ContainsKey("YZBPHLV"))
                    {
                        dicYQFailItems.Add("YZBPHLV", "一轴不平衡率不合格、");
                    }
                    else
                    {
                        dicYQFailItems["YZBPHLV"] = "一轴不平衡率不合格、";
                    }
                }
                else
                {
                    drBrakeD["YZBPHLV"] = M_RESULT_BRAKE_ZJ.YZBPHLV;
                    if (dicYQFailItems.ContainsKey("YZBPHLV"))
                    {
                        dicYQFailItems["YZBPHLV"] = "";
                    }
                }
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.YZZZDCZD))
            {
                drBrakeD["YZZZDCZD"] = M_RESULT_BRAKE_ZJ.YZZZDCZD;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.YZYZDCZD))
            {
                drBrakeD["YZYZDCZD"] = M_RESULT_BRAKE_ZJ.YZYZDCZD;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.YZZZZLV))
            {
                if (M_RESULT_BRAKE_ZJ.YZZZZL_PD == "2")
                {
                    drBrakeD["YZZZZLV"] = M_RESULT_BRAKE_ZJ.YZZZZLV + FlagFails;
                    if (!dicYQFailItems.ContainsKey("YZZZZLV"))
                    {
                        dicYQFailItems.Add("YZZZZLV", "一轴左轮阻滞率不合格、");
                    }
                    else
                    {
                        dicYQFailItems["YZZZZLV"] = "一轴左轮阻滞率不合格、";
                    }
                }
                else
                {
                    drBrakeD["YZZZZLV"] = M_RESULT_BRAKE_ZJ.YZZZZLV;
                    if (dicYQFailItems.ContainsKey("YZZZZLV"))
                    {
                        dicYQFailItems["YZZZZLV"] = "";
                    }
                }
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.YZYZZLV))
            {
                if (M_RESULT_BRAKE_ZJ.YZYZZL_PD == "2")
                {
                    drBrakeD["YZYZZLV"] = M_RESULT_BRAKE_ZJ.YZYZZLV + FlagFails;
                    if (!dicYQFailItems.ContainsKey("YZYZZLV"))
                    {
                        dicYQFailItems.Add("YZYZZLV", "一轴右轮阻滞率不合格、");
                    }
                    else
                    {
                        dicYQFailItems["YZYZZLV"] = "一轴右轮阻滞率不合格、";
                    }
                }
                else
                {
                    drBrakeD["YZYZZLV"] = M_RESULT_BRAKE_ZJ.YZYZZLV;
                    if (dicYQFailItems.ContainsKey("YZYZZLV"))
                    {
                        dicYQFailItems["YZYZZLV"] = "";
                    }
                }
            }

            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.YZZDLV_PD))
            {
                drBrakeD["YZZDLV_PD"] = GetPDResult(M_RESULT_BRAKE_ZJ.YZZDLV_PD);
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.YZBPHLV_PD) && Convert.ToInt32(M_RESULT_BRAKE_ZJ.YZBPHLV_PD) > 0)
            {
                drBrakeD["YZBPHLV_PD"] = GetPDResultDJ(float.Parse(M_RESULT_BRAKE_ZJ.YZBPHLV), Convert.ToInt32(M_RESULT_BRAKE_ZJ.YZBPHLV_PD), true, true)[0];
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.YZZZZL_PD))
            {
                drBrakeD["YZZZZL_PD"] = GetPDResult(M_RESULT_BRAKE_ZJ.YZZZZL_PD);
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.YZYZZL_PD))
            {
                drBrakeD["YZYZZL_PD"] = GetPDResult(M_RESULT_BRAKE_ZJ.YZYZZL_PD);
            }
            #endregion

            #region 二轴
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.EZZDLV))
            {
                if (M_RESULT_BRAKE_ZJ.EZZDLV_PD == "2")
                {
                    drBrakeD["EZZDLV"] = M_RESULT_BRAKE_ZJ.EZZDLV + FlagFails;
                    if (!dicYQFailItems.ContainsKey("EZZDLV"))
                    {
                        dicYQFailItems.Add("EZZDLV", "二轴制动率不合格、");
                    }
                    else
                    {
                        dicYQFailItems["EZZDLV"] = "二轴制动率不合格、";
                    }
                }
                else
                {
                    drBrakeD["EZZDLV"] = M_RESULT_BRAKE_ZJ.EZZDLV;
                    if (dicYQFailItems.ContainsKey("EZZDLV"))
                    {
                        dicYQFailItems["EZZDLV"] = "";
                    }
                }
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.EZBPHLV))
            {
                if (M_RESULT_BRAKE_ZJ.EZBPHLV_PD == "2")
                {
                    drBrakeD["EZBPHLV"] = M_RESULT_BRAKE_ZJ.EZBPHLV + FlagFails;
                    if (!dicYQFailItems.ContainsKey("EZBPHLV"))
                    {
                        dicYQFailItems.Add("EZBPHLV", "二轴不平衡率不合格、");
                    }
                    else
                    {
                        dicYQFailItems["EZBPHLV"] = "二轴不平衡率不合格、";
                    }
                }
                else
                {
                    drBrakeD["EZBPHLV"] = M_RESULT_BRAKE_ZJ.EZBPHLV;
                    if (dicYQFailItems.ContainsKey("EZBPHLV"))
                    {
                        dicYQFailItems["EZBPHLV"] = "";
                    }
                }
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.EZZZDCZD))
            {
                drBrakeD["EZZZDCZD"] = M_RESULT_BRAKE_ZJ.EZZZDCZD;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.EZYZDCZD))
            {
                drBrakeD["EZYZDCZD"] = M_RESULT_BRAKE_ZJ.EZYZDCZD;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.EZZZZLV))
            {
                if (M_RESULT_BRAKE_ZJ.EZZZZL_PD == "2")
                {
                    drBrakeD["EZZZZLV"] = M_RESULT_BRAKE_ZJ.EZZZZLV + FlagFails;
                    if (!dicYQFailItems.ContainsKey("EZZZZLV"))
                    {
                        dicYQFailItems.Add("EZZZZLV", "二轴左轮阻滞率不合格、");
                    }
                    else
                    {
                        dicYQFailItems["EZZZZLV"] = "二轴左轮阻滞率不合格、";
                    }
                }
                else
                {
                    drBrakeD["EZZZZLV"] = M_RESULT_BRAKE_ZJ.EZZZZLV;
                    if (dicYQFailItems.ContainsKey("EZZZZLV"))
                    {
                        dicYQFailItems["EZZZZLV"] = "";
                    }
                }
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.EZYZZLV))
            {
                if (M_RESULT_BRAKE_ZJ.EZYZZL_PD == "2")
                {
                    drBrakeD["EZYZZLV"] = M_RESULT_BRAKE_ZJ.EZYZZLV + FlagFails;
                    if (!dicYQFailItems.ContainsKey("EZYZZLV"))
                    {
                        dicYQFailItems.Add("EZYZZLV", "二轴右轮阻滞率不合格、");
                    }
                    else
                    {
                        dicYQFailItems["EZYZZLV"] = "二轴右轮阻滞率不合格、";
                    }
                }
                else
                {
                    drBrakeD["EZYZZLV"] = M_RESULT_BRAKE_ZJ.EZYZZLV;
                    if (dicYQFailItems.ContainsKey("EZYZZLV"))
                    {
                        dicYQFailItems["EZYZZLV"] = "";
                    }
                }
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.EZZDLV_PD))
            {
                drBrakeD["EZZDLV_PD"] = GetPDResult(M_RESULT_BRAKE_ZJ.EZZDLV_PD);
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.EZBPHLV_PD) && Convert.ToInt32(M_RESULT_BRAKE_ZJ.EZBPHLV_PD) > 0)
            {
                //前轴是转向轴，两个转向轴都是前轴
                bool bQZ = ZXZSL == 2 ? true : false;
                drBrakeD["EZBPHLV_PD"] = GetPDResultDJ(float.Parse(M_RESULT_BRAKE_ZJ.EZBPHLV), Convert.ToInt32(M_RESULT_BRAKE_ZJ.EZBPHLV_PD), bQZ, true)[0];
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.EZZZZL_PD))
            {
                drBrakeD["EZZZZL_PD"] = GetPDResult(M_RESULT_BRAKE_ZJ.EZZZZL_PD);
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.EZYZZL_PD))
            {
                drBrakeD["EZYZZL_PD"] = GetPDResult(M_RESULT_BRAKE_ZJ.EZYZZL_PD);
            }
            #endregion

            #region 三轴
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SZZDLV))
            {
                if (M_RESULT_BRAKE_ZJ.SZZDLV_PD == "2")
                {
                    drBrakeD["SZZDLV"] = M_RESULT_BRAKE_ZJ.SZZDLV + FlagFails;
                    if (!dicYQFailItems.ContainsKey("SZZDLV"))
                    {
                        dicYQFailItems.Add("SZZDLV", "三轴制动率不合格、");
                    }
                    else
                    {
                        dicYQFailItems["SZZDLV"] = "三轴制动率不合格、";
                    }
                }
                else
                {
                    drBrakeD["SZZDLV"] = M_RESULT_BRAKE_ZJ.SZZDLV;
                    if (dicYQFailItems.ContainsKey("SZZDLV"))
                    {
                        dicYQFailItems["SZZDLV"] = "";
                    }
                }
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SZBPHLV))
            {
                if (M_RESULT_BRAKE_ZJ.SZBPHLV_PD == "2")
                {
                    drBrakeD["SZBPHLV"] = M_RESULT_BRAKE_ZJ.SZBPHLV + FlagFails;
                    if (!dicYQFailItems.ContainsKey("SZBPHLV"))
                    {
                        dicYQFailItems.Add("SZBPHLV", "三轴不平衡率不合格、");
                    }
                    else
                    {
                        dicYQFailItems["SZBPHLV"] = "三轴不平衡率不合格、";
                    }
                }
                else
                {
                    drBrakeD["SZBPHLV"] = M_RESULT_BRAKE_ZJ.SZBPHLV;
                    if (dicYQFailItems.ContainsKey("SZBPHLV"))
                    {
                        dicYQFailItems["SZBPHLV"] = "";
                    }
                }
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SZZZDCZD))
            {
                drBrakeD["SZZZDCZD"] = M_RESULT_BRAKE_ZJ.SZZZDCZD;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SZYZDCZD))
            {
                drBrakeD["SZYZDCZD"] = M_RESULT_BRAKE_ZJ.SZYZDCZD;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SZZZZLV))
            {
                if (M_RESULT_BRAKE_ZJ.SZZZZL_PD == "2")
                {
                    drBrakeD["SZZZZLV"] = M_RESULT_BRAKE_ZJ.SZZZZLV + FlagFails;
                    if (!dicYQFailItems.ContainsKey("SZZZZLV"))
                    {
                        dicYQFailItems.Add("SZZZZLV", "三轴左轮阻滞率不合格、");
                    }
                    else
                    {
                        dicYQFailItems["SZZZZLV"] = "三轴左轮阻滞率不合格、";
                    }
                }
                else
                {
                    drBrakeD["SZZZZLV"] = M_RESULT_BRAKE_ZJ.SZZZZLV;
                    if (dicYQFailItems.ContainsKey("SZZZZLV"))
                    {
                        dicYQFailItems["SZZZZLV"] = "";
                    }
                }
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SZYZZLV))
            {
                if (M_RESULT_BRAKE_ZJ.SZYZZL_PD == "2")
                {
                    drBrakeD["SZYZZLV"] = M_RESULT_BRAKE_ZJ.SZYZZLV + FlagFails;
                    if (!dicYQFailItems.ContainsKey("SZYZZLV"))
                    {
                        dicYQFailItems.Add("SZYZZLV", "三轴右轮阻滞率不合格、");
                    }
                    else
                    {
                        dicYQFailItems["SZYZZLV"] = "三轴右轮阻滞率不合格、";
                    }
                }
                else
                {
                    drBrakeD["SZYZZLV"] = M_RESULT_BRAKE_ZJ.SZYZZLV;
                    if (dicYQFailItems.ContainsKey("SZYZZLV"))
                    {
                        dicYQFailItems["SZYZZLV"] = "";
                    }
                }
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SZZDLV_PD))
            {
                drBrakeD["SZZDLV_PD"] = GetPDResult(M_RESULT_BRAKE_ZJ.SZZDLV_PD);
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SZBPHLV_PD) && Convert.ToInt32(M_RESULT_BRAKE_ZJ.SZBPHLV_PD) > 0)
            {
                drBrakeD["SZBPHLV_PD"] = GetPDResultDJ(float.Parse(M_RESULT_BRAKE_ZJ.SZBPHLV), Convert.ToInt32(M_RESULT_BRAKE_ZJ.SZBPHLV_PD), false, true)[0];
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SZZZZL_PD))
            {
                drBrakeD["SZZZZL_PD"] = GetPDResult(M_RESULT_BRAKE_ZJ.SZZZZL_PD);
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SZYZZL_PD))
            {
                drBrakeD["SZYZZL_PD"] = GetPDResult(M_RESULT_BRAKE_ZJ.SZYZZL_PD);
            }
            #endregion

            #region 四轴
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SIZZDLV))
            {
                if (M_RESULT_BRAKE_ZJ.SIZZDLV_PD == "2")
                {
                    drBrakeD["SIZZDLV"] = M_RESULT_BRAKE_ZJ.SIZZDLV + FlagFails;
                    if (!dicYQFailItems.ContainsKey("SIZZDLV"))
                    {
                        dicYQFailItems.Add("SIZZDLV", "四轴制动率不合格、");
                    }
                    else
                    {
                        dicYQFailItems["SIZZDLV"] = "四轴制动率不合格、";
                    }
                }
                else
                {
                    drBrakeD["SIZZDLV"] = M_RESULT_BRAKE_ZJ.SIZZDLV;
                    if (dicYQFailItems.ContainsKey("SIZZDLV"))
                    {
                        dicYQFailItems["SIZZDLV"] = "";
                    }
                }
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SIZBPHLV))
            {
                if (M_RESULT_BRAKE_ZJ.SIZBPHLV_PD == "2")
                {
                    drBrakeD["SIZBPHLV"] = M_RESULT_BRAKE_ZJ.SIZBPHLV + FlagFails;
                    if (!dicYQFailItems.ContainsKey("SIZBPHLV"))
                    {
                        dicYQFailItems.Add("SIZBPHLV", "四轴不平衡率不合格、");
                    }
                    else
                    {
                        dicYQFailItems["SIZBPHLV"] = "四轴不平衡率不合格、";
                    }
                }
                else
                {
                    drBrakeD["SIZBPHLV"] = M_RESULT_BRAKE_ZJ.SIZBPHLV;
                    if (dicYQFailItems.ContainsKey("SIZBPHLV"))
                    {
                        dicYQFailItems["SIZBPHLV"] = "";
                    }
                }
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SIZZZDCZD))
            {
                drBrakeD["SIZZZDCZD"] = M_RESULT_BRAKE_ZJ.SIZZZDCZD;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SIZYZDCZD))
            {
                drBrakeD["SIZYZDCZD"] = M_RESULT_BRAKE_ZJ.SIZYZDCZD;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SIZZZZLV))
            {
                if (M_RESULT_BRAKE_ZJ.SIZZZZL_PD == "2")
                {
                    drBrakeD["SIZZZZLV"] = M_RESULT_BRAKE_ZJ.SIZZZZLV + FlagFails;
                    if (!dicYQFailItems.ContainsKey("SIZZZZLV"))
                    {
                        dicYQFailItems.Add("SIZZZZLV", "四轴左轮阻滞率不合格、");
                    }
                    else
                    {
                        dicYQFailItems["SIZZZZLV"] = "四轴左轮阻滞率不合格、";
                    }
                }
                else
                {
                    drBrakeD["SIZZZZLV"] = M_RESULT_BRAKE_ZJ.SIZZZZLV;
                    if (dicYQFailItems.ContainsKey("SIZZZZLV"))
                    {
                        dicYQFailItems["SIZZZZLV"] = "";
                    }
                }
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SIZYZZLV))
            {
                if (M_RESULT_BRAKE_ZJ.SIZYZZL_PD == "2")
                {
                    drBrakeD["SIZYZZLV"] = M_RESULT_BRAKE_ZJ.SIZYZZLV + FlagFails;
                    if (!dicYQFailItems.ContainsKey("SIZYZZLV"))
                    {
                        dicYQFailItems.Add("SIZYZZLV", "四轴右轮阻滞率不合格、");
                    }
                    else
                    {
                        dicYQFailItems["SIZYZZLV"] = "四轴右轮阻滞率不合格、";
                    }
                }
                else
                {
                    drBrakeD["SIZYZZLV"] = M_RESULT_BRAKE_ZJ.SIZYZZLV;
                    if (dicYQFailItems.ContainsKey("SIZYZZLV"))
                    {
                        dicYQFailItems["SIZYZZLV"] = "";
                    }
                }
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SIZZDLV_PD))
            {
                drBrakeD["SIZZDLV_PD"] = GetPDResult(M_RESULT_BRAKE_ZJ.SIZZDLV_PD);
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SIZBPHLV_PD) && Convert.ToInt32(M_RESULT_BRAKE_ZJ.SIZBPHLV_PD) > 0)
            {
                drBrakeD["SIZBPHLV_PD"] = GetPDResultDJ(float.Parse(M_RESULT_BRAKE_ZJ.SIZBPHLV), Convert.ToInt32(M_RESULT_BRAKE_ZJ.SIZBPHLV_PD), false, true)[0];
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SIZZZZL_PD))
            {
                drBrakeD["SIZZZZL_PD"] = GetPDResult(M_RESULT_BRAKE_ZJ.SIZZZZL_PD);
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.SIZYZZL_PD))
            {
                drBrakeD["SIZYZZL_PD"] = GetPDResult(M_RESULT_BRAKE_ZJ.SIZYZZL_PD);
            }
            #endregion

            #region 五轴
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.WZZDLV))
            {
                if (M_RESULT_BRAKE_ZJ.WZZDLV_PD == "2")
                {
                    drBrakeD["WZZDLV"] = M_RESULT_BRAKE_ZJ.WZZDLV + FlagFails;
                    if (!dicYQFailItems.ContainsKey("WZZDLV"))
                    {
                        dicYQFailItems.Add("WZZDLV", "五轴制动率不合格、");
                    }
                    else
                    {
                        dicYQFailItems["WZZDLV"] = "五轴制动率不合格、";
                    }
                }
                else
                {
                    drBrakeD["WZZDLV"] = M_RESULT_BRAKE_ZJ.WZZDLV;
                    if (dicYQFailItems.ContainsKey("WZZDLV"))
                    {
                        dicYQFailItems["WZZDLV"] = "";
                    }
                }
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.WZBPHLV))
            {
                if (M_RESULT_BRAKE_ZJ.WZBPHLV_PD == "2")
                {
                    drBrakeD["WZBPHLV"] = M_RESULT_BRAKE_ZJ.WZBPHLV + FlagFails;
                    if (!dicYQFailItems.ContainsKey("WZBPHLV"))
                    {
                        dicYQFailItems.Add("WZBPHLV", "五轴不平衡率不合格、");
                    }
                    else
                    {
                        dicYQFailItems["WZBPHLV"] = "五轴不平衡率不合格、";
                    }
                }
                else
                {
                    drBrakeD["WZBPHLV"] = M_RESULT_BRAKE_ZJ.WZBPHLV;
                    if (dicYQFailItems.ContainsKey("WZBPHLV"))
                    {
                        dicYQFailItems["WZBPHLV"] = "";
                    }
                }
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.WZZZDCZD))
            {
                drBrakeD["WZZZDCZD"] = M_RESULT_BRAKE_ZJ.WZZZDCZD;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.WZYZDCZD))
            {
                drBrakeD["WZYZDCZD"] = M_RESULT_BRAKE_ZJ.WZYZDCZD;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.WZZZZLV))
            {
                if (M_RESULT_BRAKE_ZJ.WZZZZL_PD == "2")
                {
                    drBrakeD["WZZZZLV"] = M_RESULT_BRAKE_ZJ.WZZZZLV + FlagFails;
                    if (!dicYQFailItems.ContainsKey("WZZZZLV"))
                    {
                        dicYQFailItems.Add("WZZZZLV", "五轴左轮阻滞率不合格、");
                    }
                    else
                    {
                        dicYQFailItems["WZZZZLV"] = "五轴左轮阻滞率不合格、";
                    }
                }
                else
                {
                    drBrakeD["WZZZZLV"] = M_RESULT_BRAKE_ZJ.WZZZZLV;
                    if (dicYQFailItems.ContainsKey("WZZZZLV"))
                    {
                        dicYQFailItems["WZZZZLV"] = "";
                    }
                }
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.WZYZZLV))
            {
                if (M_RESULT_BRAKE_ZJ.WZYZZL_PD == "2")
                {
                    drBrakeD["WZYZZLV"] = M_RESULT_BRAKE_ZJ.WZYZZLV + FlagFails;
                    if (!dicYQFailItems.ContainsKey("WZYZZLV"))
                    {
                        dicYQFailItems.Add("WZYZZLV", "五轴右轮阻滞率不合格、");
                    }
                    else
                    {
                        dicYQFailItems["WZYZZLV"] = "五轴右轮阻滞率不合格、";
                    }
                }
                else
                {
                    drBrakeD["WZYZZLV"] = M_RESULT_BRAKE_ZJ.WZYZZLV;
                    if (dicYQFailItems.ContainsKey("WZYZZLV"))
                    {
                        dicYQFailItems["WZYZZLV"] = "";
                    }
                }
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.WZZDLV_PD))
            {
                drBrakeD["WZZDLV_PD"] = GetPDResult(M_RESULT_BRAKE_ZJ.WZZDLV_PD);
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.WZBPHLV_PD) && Convert.ToInt32(M_RESULT_BRAKE_ZJ.WZBPHLV_PD) > 0)
            {
                drBrakeD["WZBPHLV_PD"] = GetPDResultDJ(float.Parse(M_RESULT_BRAKE_ZJ.WZBPHLV), Convert.ToInt32(M_RESULT_BRAKE_ZJ.WZBPHLV_PD), false, true)[0];
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.WZZZZL_PD))
            {
                drBrakeD["WZZZZL_PD"] = GetPDResult(M_RESULT_BRAKE_ZJ.WZZZZL_PD);
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.WZYZZL_PD))
            {
                drBrakeD["WZYZZL_PD"] = GetPDResult(M_RESULT_BRAKE_ZJ.WZYZZL_PD);
            }
            #endregion

            #region 六轴
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.LZZDLV))
            {
                if (M_RESULT_BRAKE_ZJ.LZZDLV_PD == "2")
                {
                    drBrakeD["LZZDLV"] = M_RESULT_BRAKE_ZJ.LZZDLV + FlagFails;
                    if (!dicYQFailItems.ContainsKey("LZZDLV"))
                    {
                        dicYQFailItems.Add("LZZDLV", "六轴制动率不合格、");
                    }
                    else
                    {
                        dicYQFailItems["LZZDLV"] = "六轴制动率不合格、";
                    }
                }
                else
                {
                    drBrakeD["LZZDLV"] = M_RESULT_BRAKE_ZJ.LZZDLV;
                    if (dicYQFailItems.ContainsKey("LZZDLV"))
                    {
                        dicYQFailItems["LZZDLV"] = "";
                    }
                }
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.LZBPHLV))
            {
                if (M_RESULT_BRAKE_ZJ.LZBPHLV_PD == "2")
                {
                    drBrakeD["LZBPHLV"] = M_RESULT_BRAKE_ZJ.LZBPHLV + FlagFails;
                    if (!dicYQFailItems.ContainsKey("LZBPHLV"))
                    {
                        dicYQFailItems.Add("LZBPHLV", "六轴不平衡率不合格、");
                    }
                    else
                    {
                        dicYQFailItems["LZBPHLV"] = "六轴不平衡率不合格、";
                    }
                }
                else
                {
                    drBrakeD["LZBPHLV"] = M_RESULT_BRAKE_ZJ.LZBPHLV;
                    if (dicYQFailItems.ContainsKey("LZBPHLV"))
                    {
                        dicYQFailItems["LZBPHLV"] = "";
                    }
                }
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.LZZZDCZD))
            {
                drBrakeD["LZZZDCZD"] = M_RESULT_BRAKE_ZJ.LZZZDCZD;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.LZYZDCZD))
            {
                drBrakeD["LZYZDCZD"] = M_RESULT_BRAKE_ZJ.LZYZDCZD;
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.LZZZZLV))
            {
                if (M_RESULT_BRAKE_ZJ.LZZZZL_PD == "2")
                {
                    drBrakeD["LZZZZLV"] = M_RESULT_BRAKE_ZJ.LZZZZLV + FlagFails;
                    if (!dicYQFailItems.ContainsKey("LZZZZLV"))
                    {
                        dicYQFailItems.Add("LZZZZLV", "六轴左轮阻滞率不合格、");
                    }
                    else
                    {
                        dicYQFailItems["LZZZZLV"] = "六轴左轮阻滞率不合格、";
                    }
                }
                else
                {
                    drBrakeD["LZZZZLV"] = M_RESULT_BRAKE_ZJ.LZZZZLV;
                    if (dicYQFailItems.ContainsKey("LZZZZLV"))
                    {
                        dicYQFailItems["LZZZZLV"] = "";
                    }
                }
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.LZYZZLV))
            {
                if (M_RESULT_BRAKE_ZJ.LZYZZL_PD == "2")
                {
                    drBrakeD["LZYZZLV"] = M_RESULT_BRAKE_ZJ.LZYZZLV + FlagFails;
                    if (!dicYQFailItems.ContainsKey("LZYZZLV"))
                    {
                        dicYQFailItems.Add("LZYZZLV", "六轴右轮阻滞率不合格、");
                    }
                    else
                    {
                        dicYQFailItems["LZYZZLV"] = "六轴右轮阻滞率不合格、";
                    }
                }
                else
                {
                    drBrakeD["LZYZZLV"] = M_RESULT_BRAKE_ZJ.LZYZZLV;
                    if (dicYQFailItems.ContainsKey("LZYZZLV"))
                    {
                        dicYQFailItems["LZYZZLV"] = "";
                    }
                }
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.LZZDLV_PD))
            {
                drBrakeD["LZZDLV_PD"] = GetPDResult(M_RESULT_BRAKE_ZJ.LZZDLV_PD);
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.LZBPHLV_PD) && Convert.ToInt32(M_RESULT_BRAKE_ZJ.WZBPHLV_PD) > 0)
            {
                drBrakeD["LZBPHLV_PD"] = GetPDResultDJ(float.Parse(M_RESULT_BRAKE_ZJ.LZBPHLV), Convert.ToInt32(M_RESULT_BRAKE_ZJ.LZBPHLV_PD), false, true)[0];
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.LZZZZL_PD))
            {
                drBrakeD["LZZZZL_PD"] = GetPDResult(M_RESULT_BRAKE_ZJ.LZZZZL_PD);
            }
            if (!string.IsNullOrEmpty(M_RESULT_BRAKE_ZJ.LZYZZL_PD))
            {
                drBrakeD["LZYZZL_PD"] = GetPDResult(M_RESULT_BRAKE_ZJ.LZYZZL_PD);
            }
            #endregion
            dtBrakeD.Rows.Add(drBrakeD);
            #endregion

            #region dtLS
            if (!string.IsNullOrEmpty(M_RESULT_ROAD.LSZDCSD))
            {
                drLS["LSZDCSD"] = M_RESULT_ROAD.LSZDCSD;
            }
            if (!string.IsNullOrEmpty(M_RESULT_ROAD.LSZDSCDK))
            {
                drLS["LSZDSCDK"] = M_RESULT_ROAD.LSZDSCDK;
            }
            if (!string.IsNullOrEmpty(M_RESULT_ROAD.LSZDJL))
            {
                drLS["LSZDJL"] = M_RESULT_ROAD.LSZDJL;
            }
            if (!string.IsNullOrEmpty(M_RESULT_ROAD.MFDD))
            {
                drLS["MFDD"] = M_RESULT_ROAD.MFDD;
            }
            if (!string.IsNullOrEmpty(M_RESULT_ROAD.LSZDPPQK))
            {
                drLS["LSZDPPQK"] = M_RESULT_ROAD.LSZDPPQK == "0" ? "稳定" : "不稳定";
            }
            if (!string.IsNullOrEmpty(M_RESULT_ROAD.LSZDXTSJ))
            {
                drLS["LSZDXTSJ"] = M_RESULT_ROAD.LSZDXTSJ;
            }
            if (!string.IsNullOrEmpty(M_RESULT_ROAD.LSZD_PD))
            {
                drLS["LSZD_PD"] = GetPDResult(M_RESULT_ROAD.LSZD_PD);
                if (M_RESULT_ROAD.LSZD_PD == "2")
                {
                    if (!dicYQFailItems.ContainsKey("LSZD_PD"))
                    {
                        dicYQFailItems.Add("LSZD_PD", "行车制动不合格、");
                    }
                    else
                    {
                        dicYQFailItems["LSZD_PD"] = "行车制动不合格、";
                    }
                }
                else
                {
                    if (dicYQFailItems.ContainsKey("LSZD_PD"))
                    {
                        dicYQFailItems["LSZD_PD"] = "";
                    }
                }
            }
            if (!string.IsNullOrEmpty(M_RESULT_ROAD.LSZCPD))
            {
                drLS["LSZCPD"] = M_RESULT_ROAD.LSZCPD;
            }
            if (!string.IsNullOrEmpty(M_RESULT_ROAD.LSZC_PD))
            {
                drLS["LSZC_PD"] = (M_RESULT_ROAD.LSZC_PD == "1" ? "不溜坡" : "溜坡");
                if (M_RESULT_ROAD.LSZC_PD == "2")
                {
                    if (!dicYQFailItems.ContainsKey("LSZC_PD"))
                    {
                        dicYQFailItems.Add("LSZC_PD", "路试制动不合格、");
                    }
                    else
                    {
                        dicYQFailItems["LSZC_PD"] = "路试制动不合格、";
                    }
                }
                else
                {
                    if (dicYQFailItems.ContainsKey("LSZC_PD"))
                    {
                        dicYQFailItems["LSZC_PD"] = "";
                    }
                }
            }
            dtLS.Rows.Add(drLS);
            #endregion

            #region dtPF 排放
            if (string.IsNullOrEmpty(M_RESULT_SDS.JCLSH))
            {
                M_RESULT_SDS = Get_RESULT_SDS(GetPQJCLSH("X1"));
            }

            if (!string.IsNullOrEmpty(M_RESULT_SDS.GDSCO))
            {
                drPF["GDSCO"] = M_RESULT_SDS.GDSCO;
            }
            if (!string.IsNullOrEmpty(M_RESULT_SDS.GDSHC))
            {
                drPF["GDSHC"] = M_RESULT_SDS.GDSHC;
            }
            if (!string.IsNullOrEmpty(M_RESULT_SDS.GLKQXS))
            {
                drPF["GLKQXS"] = M_RESULT_SDS.GLKQXS;
            }
            if (!string.IsNullOrEmpty(M_RESULT_SDS.DSCO))
            {
                drPF["DSCO"] = M_RESULT_SDS.DSCO;
            }
            if (!string.IsNullOrEmpty(M_RESULT_SDS.DSHC))
            {
                drPF["DSHC"] = M_RESULT_SDS.DSHC;
            }

            if (string.IsNullOrEmpty(M_RESULT_VMAS.JCLSH) == true)
            {
                M_RESULT_VMAS = Get_RESULT_VMAS(GetPQJCLSH("X3"));
            }
            if (!string.IsNullOrEmpty(M_RESULT_VMAS.COJG))
            {
                drPF["COJG"] = M_RESULT_VMAS.COJG;
            }
            if (!string.IsNullOrEmpty(M_RESULT_VMAS.HCJG))
            {
                drPF["HCJG"] = M_RESULT_VMAS.HCJG;
            }
            if (!string.IsNullOrEmpty(M_RESULT_VMAS.NOJG))
            {
                drPF["NOJG"] = M_RESULT_VMAS.NOJG;
            }
            if (!string.IsNullOrEmpty(M_RESULT_VMAS.HC_NOJG))
            {
                drPF["HC_NOJG"] = M_RESULT_VMAS.HC_NOJG;
            }

            if (string.IsNullOrEmpty(M_RESULT_ASM.JCLSH) == true)
            {
                M_RESULT_ASM = Get_RESULT_ASM(GetPQJCLSH("X2"));
            }
            if (!string.IsNullOrEmpty(M_RESULT_ASM.CO5025JG))
            {
                drPF["WTGK_1"] = M_RESULT_ASM.CO5025JG;
            }
            if (!string.IsNullOrEmpty(M_RESULT_ASM.HC5025JG))
            {
                drPF["WTGK_2"] = M_RESULT_ASM.HC5025JG;
            }
            if (!string.IsNullOrEmpty(M_RESULT_ASM.NO5025JG))
            {
                drPF["WTGK_3"] = M_RESULT_ASM.NO5025JG;
            }
            if (!string.IsNullOrEmpty(M_RESULT_ASM.CO2540JG))
            {
                drPF["WTGK_4"] = M_RESULT_ASM.CO2540JG;
            }
            if (!string.IsNullOrEmpty(M_RESULT_ASM.HC2540JG))
            {
                drPF["WTGK_5"] = M_RESULT_ASM.HC2540JG;
            }
            if (!string.IsNullOrEmpty(M_RESULT_ASM.NO2540JG))
            {
                drPF["WTGK_6"] = M_RESULT_ASM.NO2540JG;
            }

            ///汽油车尾气是否合格
            if (!string.IsNullOrEmpty(M_RESULT_SDS.SDS_PD) && Convert.ToInt32(M_RESULT_SDS.SDS_PD) != 0)
            {
                if (Convert.ToInt32(M_RESULT_SDS.SDS_PD) == 1)
                {
                    drPF["strQYCWQ_PD"] = Pass;
                    if (dicYQFailItems.ContainsKey("QYCWQ"))
                    {
                        dicYQFailItems["QYCWQ"] = "";
                    }
                }
                else if (Convert.ToInt32(M_RESULT_SDS.SDS_PD) == 2)
                {
                    drPF["strQYCWQ_PD"] = Fail;
                    if (!dicYQFailItems.ContainsKey("QYCWQ"))
                    {
                        dicYQFailItems.Add("QYCWQ", "双怠速不合格、");
                    }
                    else
                    {
                        dicYQFailItems["QYCWQ"] = "双怠速不合格、";
                    }
                }
            }
            else if (!string.IsNullOrEmpty(M_RESULT_ASM.ASM_PD) && Convert.ToInt32(M_RESULT_ASM.ASM_PD) != 0)
            {
                if (Convert.ToInt32(M_RESULT_ASM.ASM_PD) == 1)
                {
                    drPF["strQYCWQ_PD"] = Pass;
                    if (dicYQFailItems.ContainsKey("QYCWQ"))
                    {
                        dicYQFailItems["QYCWQ"] = "";
                    }
                }
                else if (Convert.ToInt32(M_RESULT_ASM.ASM_PD) == 2)
                {
                    drPF["strQYCWQ_PD"] = Fail;
                    if (!dicYQFailItems.ContainsKey("QYCWQ"))
                    {
                        dicYQFailItems.Add("QYCWQ", "稳态工况不合格、");
                    }
                    else
                    {
                        dicYQFailItems["QYCWQ"] = "稳态工况不合格、";
                    }
                }
            }
            else if (!string.IsNullOrEmpty(M_RESULT_VMAS.VMAS_PD) && Convert.ToInt32(M_RESULT_VMAS.VMAS_PD) != 0)
            {
                if (Convert.ToInt32(M_RESULT_VMAS.VMAS_PD) == 1)
                {
                    drPF["strQYCWQ_PD"] = Pass;
                    if (dicYQFailItems.ContainsKey("QYCWQ"))
                    {
                        dicYQFailItems["QYCWQ"] = "";
                    }
                }
                else if (Convert.ToInt32(M_RESULT_VMAS.VMAS_PD) == 2)
                {
                    drPF["strQYCWQ_PD"] = Fail;
                    if (!dicYQFailItems.ContainsKey("QYCWQ"))
                    {
                        dicYQFailItems.Add("QYCWQ", "简易瞬态工况不合格、");
                    }
                    else
                    {
                        dicYQFailItems["QYCWQ"] = "简易瞬态工况不合格、";
                    }
                }
            }

            if (string.IsNullOrEmpty(M_RESULT_ZYJS.JCLSH) == true)
            {
                //自由加速不透光
                M_RESULT_ZYJS = Get_RESULT_ZYJS(GetPQJCLSH("X4"));
            }

            string strJYXM = vehicle_bll.GetModel(M_RESULT_ZYJS.JCLSH).JYXM;
            if (string.IsNullOrEmpty(M_RESULT_ZYJS.JCLSH) == false && strJYXM.Contains("X4"))
            {//自由加速不透光
                if (!string.IsNullOrEmpty(M_RESULT_ZYJS.ZYJSJG1))
                {
                    drPF["ZYJSJG1"] = M_RESULT_ZYJS.ZYJSJG1;
                }

                if (!string.IsNullOrEmpty(M_RESULT_ZYJS.ZYJSJG2))
                {
                    drPF["ZYJSJG2"] = M_RESULT_ZYJS.ZYJSJG2;
                }

                if (!string.IsNullOrEmpty(M_RESULT_ZYJS.ZYJSJG3))
                {
                    drPF["ZYJSJG3"] = M_RESULT_ZYJS.ZYJSJG3;
                }
            }
            else
            {//自由加速滤纸式
                M_RESULT_ZYJS = Get_RESULT_ZYJS(GetPQJCLSH("X6"));
            }

            if (string.IsNullOrEmpty(M_RESULT_ZYJS.JCLSH) == false && strJYXM.Contains("X6"))
            {//自由加速滤纸式
                if (!string.IsNullOrEmpty(M_RESULT_ZYJS.ZYJSJG2))
                {
                    drPF["ZYJSJG1"] = M_RESULT_ZYJS.ZYJSJG2;
                }

                if (!string.IsNullOrEmpty(M_RESULT_ZYJS.ZYJSJG3))
                {
                    drPF["ZYJSJG2"] = M_RESULT_ZYJS.ZYJSJG3;
                }

                if (!string.IsNullOrEmpty(M_RESULT_ZYJS.ZYJSJG4))
                {
                    drPF["ZYJSJG3"] = M_RESULT_ZYJS.ZYJSJG4;
                }
            }

            if (!string.IsNullOrEmpty(M_RESULT_ZYJS.ZYJSPJZ))
            {
                drPF["ZYJSPJZ"] = M_RESULT_ZYJS.ZYJSPJZ;
            }

            if (string.IsNullOrEmpty(M_RESULT_LD.JCLSH) == true)
            {
                //Lugdown
                M_RESULT_LD = Get_RESULT_LD(GetPQJCLSH("X5"));
            }

            if (!string.IsNullOrEmpty(M_RESULT_LD.GXSXS100))
            {
                drPF["GXSXS100"] = M_RESULT_LD.GXSXS100;
            }
            if (!string.IsNullOrEmpty(M_RESULT_LD.GXSXS90))
            {
                drPF["GXSXS90"] = M_RESULT_LD.GXSXS90;
            }
            if (!string.IsNullOrEmpty(M_RESULT_LD.GXSXS80))
            {
                drPF["GXSXS80"] = M_RESULT_LD.GXSXS80;
            }
            if (!string.IsNullOrEmpty(M_RESULT_LD.GLJG))
            {
                drPF["GLJG"] = M_RESULT_LD.GLJG;
            }

            if (!string.IsNullOrEmpty(M_RESULT_ZYJS.ZYJS_PD) && Convert.ToInt32(M_RESULT_ZYJS.ZYJS_PD) != 0)
            {
                if (Convert.ToInt32(M_RESULT_ZYJS.ZYJS_PD) == 1)
                {
                    drPF["strZYJS_PD"] = Pass;
                    if (dicYQFailItems.ContainsKey("CYCWQ"))
                    {
                        dicYQFailItems["CYCWQ"] = "";
                    }
                }
                else
                {
                    drPF["strZYJS_PD"] = Fail;
                    if (!dicYQFailItems.ContainsKey("CYCWQ"))
                    {
                        dicYQFailItems.Add("CYCWQ", "自由加速不合格、");
                    }
                    else
                    {
                        dicYQFailItems["CYCWQ"] = "自由加速不合格、";
                    }
                }
            }
            else if (!string.IsNullOrEmpty(M_RESULT_LD.LD_PD) && Convert.ToInt32(M_RESULT_LD.LD_PD) != 0)
            {
                if (Convert.ToInt32(M_RESULT_LD.LD_PD) == 1)
                {
                    drPF["strZYJS_PD"] = Pass;
                    if (dicYQFailItems.ContainsKey("CYCWQ"))
                    {
                        dicYQFailItems["CYCWQ"] = "";
                    }
                }
                else
                {
                    drPF["strZYJS_PD"] = Fail;
                    if (!dicYQFailItems.ContainsKey("CYCWQ"))
                    {
                        dicYQFailItems.Add("CYCWQ", "加载减速不合格、");
                    }
                    else
                    {
                        dicYQFailItems["CYCWQ"] = "加载减速不合格、";
                    }
                }
            }
            //else
            //{
            //    drPF["strQYCWQ_PD"] = NoTest;
            //}

            if (IsNewVehicle)
            {
                drPF = SetDataTableDefaultValue(ref dtPF, Nothing);
                if (IsQYC)
                {
                    drPF["strQYCWQ_PD"] = Pass;
                    drPF["strZYJS_PD"] = Nothing;
                }

                if (IsCYC)
                {
                    drPF["strQYCWQ_PD"] = Nothing;
                    drPF["strZYJS_PD"] = Pass;
                }
            }
            dtPF.Rows.Add(drPF);
            #endregion

            #region dtXJ
            if (!string.IsNullOrEmpty(M_RESULT_SUSPENSION.QZ_PD) && Convert.ToInt32(M_RESULT_SUSPENSION.QZ_PD) > 0)
            {
                drXJ["QZZLXSLV"] = M_RESULT_SUSPENSION.QZZLXSLV;
                drXJ["QZYLXSLV"] = M_RESULT_SUSPENSION.QZYLXSLV;
                drXJ["QZXSLVC"] = M_RESULT_SUSPENSION.QZXSLVC;
                drXJ["QZ_PD"] = GetPDResult(M_RESULT_SUSPENSION.QZ_PD);
                if (M_RESULT_SUSPENSION.QZ_PD == "2")
                {
                    if (!dicYQFailItems.ContainsKey("QZ_PD"))
                    {
                        dicYQFailItems.Add("QZ_PD", "悬架前轴不合格、");
                    }
                    else
                    {
                        dicYQFailItems["QZ_PD"] = "悬架前轴不合格、";
                    }
                }
                else
                {
                    if (dicYQFailItems.ContainsKey("QZ_PD"))
                    {
                        dicYQFailItems["QZ_PD"] = "";
                    }
                }
            }

            if (!string.IsNullOrEmpty(M_RESULT_SUSPENSION.HZ_PD) && Convert.ToInt32(M_RESULT_SUSPENSION.HZ_PD) > 0)
            {
                drXJ["HZZLXSLV"] = M_RESULT_SUSPENSION.HZZLXSLV;
                drXJ["HZYLXSLV"] = M_RESULT_SUSPENSION.HZYLXSLV;
                drXJ["HZXSLVC"] = M_RESULT_SUSPENSION.HZXSLVC;
                drXJ["HZ_PD"] = GetPDResult(M_RESULT_SUSPENSION.HZ_PD);
                if (M_RESULT_SUSPENSION.HZ_PD == "2")
                {
                    if (!dicYQFailItems.ContainsKey("HZ_PD"))
                    {
                        dicYQFailItems.Add("HZ_PD", "悬架后轴不合格、");
                    }
                    else
                    {
                        dicYQFailItems["HZ_PD"] = "悬架后轴不合格、";
                    }
                }
                else
                {
                    if (dicYQFailItems.ContainsKey("HZ_PD"))
                    {
                        dicYQFailItems["HZ_PD"] = "";
                    }
                }
            }
            dtXJ.Rows.Add(drXJ);
            #endregion

            #region dtLamp
            //左外灯
            if (!string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.ZWDZ_PD) && M_RESULT_LAMP_ZJ.ZWDZ_PD != Nothing)
            {
                if (Convert.ToInt32(M_RESULT_LAMP_ZJ.ZWDZ_PD) > 0)
                {
                    drLamp["ZWDZ_PD"] = GetPDResult(M_RESULT_LAMP_ZJ.ZWDZ_PD);
                    if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.ZWDJGDG) == false)
                    {
                        drLamp["ZWDJGDG"] = M_RESULT_LAMP_ZJ.ZWDJGDG;
                    }
                    if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.ZWDYGDG) == false)
                    {
                        drLamp["ZWDYGDG"] = M_RESULT_LAMP_ZJ.ZWDYGDG;
                    }
                    if (M_RESULT_LAMP_ZJ.ZWDYGGQ_PD == "2")
                    {
                        drLamp["ZWDYGGQ"] = M_RESULT_LAMP_ZJ.ZWDYGGQ + FlagFails;
                        if (!dicYQFailItems.ContainsKey("ZWDYGGQ"))
                        {
                            dicYQFailItems.Add("ZWDYGGQ", "左外灯远光光强不合格、");
                        }
                        else
                        {
                            dicYQFailItems["ZWDYGGQ"] = "左外灯远光光强不合格、";
                        }
                    }
                    else
                    {
                        if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.ZWDYGGQ) == false)
                        {
                            drLamp["ZWDYGGQ"] = M_RESULT_LAMP_ZJ.ZWDYGGQ;
                        }

                        if (dicYQFailItems.ContainsKey("ZWDYGGQ"))
                        {
                            dicYQFailItems["ZWDYGGQ"] = "";
                        }
                    }

                    if (M_RESULT_LAMP_ZJ.ZWDYGCZPY_PD == "2")
                    {
                        drLamp["ZWDYGCZPY"] = M_RESULT_LAMP_ZJ.ZWDYGCZPY + FlagFails;
                        if (!dicYQFailItems.ContainsKey("ZWDYGCZPY"))
                        {
                            dicYQFailItems.Add("ZWDYGCZPY", "左外灯远光垂直偏移不合格、");
                        }
                        else
                        {
                            dicYQFailItems["ZWDYGCZPY"] = "左外灯远光垂直偏移不合格、";
                        }
                    }
                    else
                    {
                        if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.ZWDYGCZPY) == false)
                        {
                            drLamp["ZWDYGCZPY"] = M_RESULT_LAMP_ZJ.ZWDYGCZPY;
                        }

                        if (dicYQFailItems.ContainsKey("ZWDYGCZPY"))
                        {
                            dicYQFailItems["ZWDYGCZPY"] = "";
                        }
                    }

                    if (M_RESULT_LAMP_ZJ.ZWDYGSPPY_PD == "2")
                    {
                        drLamp["ZWDYGSPPYL"] = M_RESULT_LAMP_ZJ.ZWDYGSPPYL + FlagFails;
                        if (!dicYQFailItems.ContainsKey("ZWDYGSPPYL"))
                        {
                            dicYQFailItems.Add("ZWDYGSPPYL", "左外灯远光水平偏移不合格、");
                        }
                        else
                        {
                            dicYQFailItems["ZWDYGSPPYL"] = "左外灯远光水平偏移不合格、";
                        }
                    }
                    else
                    {
                        if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.ZWDYGSPPYL) == false)
                        {
                            drLamp["ZWDYGSPPYL"] = M_RESULT_LAMP_ZJ.ZWDYGSPPYL;
                        }

                        if (dicYQFailItems.ContainsKey("ZWDYGSPPYL"))
                        {
                            dicYQFailItems["ZWDYGSPPYL"] = "";
                        }
                    }

                    if (M_RESULT_LAMP_ZJ.ZWDJGCZPY_PD == "2")
                    {
                        drLamp["ZWDJGCZPY"] = M_RESULT_LAMP_ZJ.ZWDJGCZPY + FlagFails;
                        if (!dicYQFailItems.ContainsKey("ZWDJGCZPY"))
                        {
                            dicYQFailItems.Add("ZWDJGCZPY", "左外灯近光垂直偏移不合格、");
                        }
                        else
                        {
                            dicYQFailItems["ZWDJGCZPY"] = "左外灯近光垂直偏移不合格、";
                        }
                    }
                    else
                    {
                        if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.ZWDJGCZPY) == false)
                        {
                            drLamp["ZWDJGCZPY"] = M_RESULT_LAMP_ZJ.ZWDJGCZPY;
                        }

                        if (dicYQFailItems.ContainsKey("ZWDJGCZPY"))
                        {
                            dicYQFailItems["ZWDJGCZPY"] = "";
                        }
                    }

                    if (M_RESULT_LAMP_ZJ.ZWDJGSPPY_PD == "2")
                    {
                        drLamp["ZWDJGSPPYL"] = M_RESULT_LAMP_ZJ.ZWDJGSPPYL + FlagFails;
                        if (!dicYQFailItems.ContainsKey("ZWDJGSPPYL"))
                        {
                            dicYQFailItems.Add("ZWDJGSPPYL", "左外灯近光水平偏移不合格、");
                        }
                        else
                        {
                            dicYQFailItems["ZWDJGSPPYL"] = "左外灯近光水平偏移不合格、";
                        }
                    }
                    else
                    {
                        if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.ZWDJGSPPYL) == false)
                        {
                            drLamp["ZWDJGSPPYL"] = M_RESULT_LAMP_ZJ.ZWDJGSPPYL;
                        }
                        if (dicYQFailItems.ContainsKey("ZWDJGSPPYL"))
                        {
                            dicYQFailItems["ZWDJGSPPYL"] = "";
                        }
                    }

                    if (!string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.ZWDYGGQ_PD))
                    {
                        drLamp["ZWDYGGQ_PD"] = GetPDResult(M_RESULT_LAMP_ZJ.ZWDYGGQ_PD);
                    }
                    if (!string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.ZWDYGCZPY_PD))
                    {
                        drLamp["ZWDYGCZPY_PD"] = GetPDResult(M_RESULT_LAMP_ZJ.ZWDYGCZPY_PD);
                    }
                    if (!string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.ZWDJGCZPY_PD))
                    {
                        drLamp["ZWDJGCZPY_PD"] = GetPDResult(M_RESULT_LAMP_ZJ.ZWDJGCZPY_PD);
                    }
                    if (!string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.ZWDJGSPPY_PD))
                    {
                        drLamp["ZWDJGSPPY_PD"] = GetPDResult(M_RESULT_LAMP_ZJ.ZWDJGSPPY_PD);
                    }
                    if (!string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.ZWDYGSPPY_PD))
                    {
                        drLamp["ZWDYGSPPY_PD"] = GetPDResult(M_RESULT_LAMP_ZJ.ZWDYGSPPY_PD);
                    }
                }
            }

            //左内灯
            if (!string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.ZNDZ_PD) && M_RESULT_LAMP_ZJ.ZNDZ_PD != Nothing)
            {
                if (Convert.ToInt32(M_RESULT_LAMP_ZJ.ZNDZ_PD) > 0)
                {
                    drLamp["ZNDZ_PD"] = GetPDResult(M_RESULT_LAMP_ZJ.ZNDZ_PD);
                    if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.ZNDJGDG) == false)
                    {
                        drLamp["ZNDJGDG"] = M_RESULT_LAMP_ZJ.ZNDJGDG;
                    }
                    if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.ZNDYGDG) == false)
                    {
                        drLamp["ZNDYGDG"] = M_RESULT_LAMP_ZJ.ZNDYGDG;
                    }
                    if (M_RESULT_LAMP_ZJ.ZNDYGGQ_PD == "2")
                    {
                        drLamp["ZNDYGGQ"] = M_RESULT_LAMP_ZJ.ZNDYGGQ + FlagFails;
                        if (!dicYQFailItems.ContainsKey("ZNDYGGQ"))
                        {
                            dicYQFailItems.Add("ZNDYGGQ", "左内灯远光光强不合格、");
                        }
                        else
                        {
                            dicYQFailItems["ZNDYGGQ"] = "左内灯远光光强不合格、";
                        }
                    }
                    else
                    {
                        if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.ZNDYGGQ) == false)
                        {
                            drLamp["ZNDYGGQ"] = M_RESULT_LAMP_ZJ.ZNDYGGQ;
                        }

                        if (dicYQFailItems.ContainsKey("ZNDYGGQ"))
                        {
                            dicYQFailItems["ZNDYGGQ"] = "";
                        }
                    }

                    if (M_RESULT_LAMP_ZJ.ZNDYGCZPY_PD == "2")
                    {
                        drLamp["ZNDYGCZPY"] = M_RESULT_LAMP_ZJ.ZNDYGCZPY + FlagFails;
                        if (!dicYQFailItems.ContainsKey("ZNDYGCZPY"))
                        {
                            dicYQFailItems.Add("ZNDYGCZPY", "左内灯远光垂直偏移不合格、");
                        }
                        else
                        {
                            dicYQFailItems["ZNDYGCZPY"] = "左内灯远光垂直偏移不合格、";
                        }
                    }
                    else
                    {

                        if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.ZNDYGCZPY) == false)
                        {
                            drLamp["ZNDYGCZPY"] = M_RESULT_LAMP_ZJ.ZNDYGCZPY;
                        }
                        if (dicYQFailItems.ContainsKey("ZNDYGCZPY"))
                        {
                            dicYQFailItems["ZNDYGCZPY"] = "";
                        }
                    }

                    if (M_RESULT_LAMP_ZJ.ZNDYGSPPY_PD == "2")
                    {
                        drLamp["ZNDYGSPPYL"] = M_RESULT_LAMP_ZJ.ZNDYGSPPYL + FlagFails;
                        if (!dicYQFailItems.ContainsKey("ZNDYGSPPYL"))
                        {
                            dicYQFailItems.Add("ZNDYGSPPYL", "左内灯远光水平偏移不合格、");
                        }
                        else
                        {
                            dicYQFailItems["ZNDYGSPPYL"] = "左内灯远光水平偏移不合格、";
                        }
                    }
                    else
                    {
                        if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.ZNDYGSPPYL) == false)
                        {
                            drLamp["ZNDYGSPPYL"] = M_RESULT_LAMP_ZJ.ZNDYGSPPYL;
                        }
                        if (dicYQFailItems.ContainsKey("ZNDYGSPPYL"))
                        {
                            dicYQFailItems["ZNDYGSPPYL"] = ""; ;
                        }
                    }

                    if (M_RESULT_LAMP_ZJ.ZNDJGCZPY_PD == "2")
                    {
                        drLamp["ZNDJGCZPY"] = M_RESULT_LAMP_ZJ.ZNDJGCZPY + FlagFails;
                        if (!dicYQFailItems.ContainsKey("ZNDJGCZPY"))
                        {
                            dicYQFailItems.Add("ZNDJGCZPY", "左内灯近光垂直偏移不合格、");
                        }
                        else
                        {
                            dicYQFailItems["ZNDJGCZPY"] = "左内灯近光垂直偏移不合格、";
                        }
                    }
                    else
                    {

                        if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.ZNDJGCZPY) == false)
                        {
                            drLamp["ZNDJGCZPY"] = M_RESULT_LAMP_ZJ.ZNDJGCZPY;
                        }
                        if (dicYQFailItems.ContainsKey("ZNDJGCZPY"))
                        {
                            dicYQFailItems["ZNDJGCZPY"] = "";
                        }
                    }

                    if (M_RESULT_LAMP_ZJ.ZNDJGSPPY_PD == "2")
                    {
                        drLamp["ZNDJGSPPYL"] = M_RESULT_LAMP_ZJ.ZNDJGSPPYL + FlagFails;
                        if (!dicYQFailItems.ContainsKey("ZNDJGSPPYL"))
                        {
                            dicYQFailItems.Add("ZNDJGSPPYL", "左内灯近光水平偏移不合格、");
                        }
                        else
                        {
                            dicYQFailItems["ZNDJGSPPYL"] = "左内灯近光水平偏移不合格、";
                        }
                    }
                    else
                    {
                        if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.ZNDJGSPPYL) == false)
                        {
                            drLamp["ZNDJGSPPYL"] = M_RESULT_LAMP_ZJ.ZNDJGSPPYL;
                        }
                        if (dicYQFailItems.ContainsKey("ZNDJGSPPYL"))
                        {
                            dicYQFailItems["ZNDJGSPPYL"] = "";
                        }
                    }

                    if (!string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.ZNDYGGQ_PD))
                    {
                        drLamp["ZNDYGGQ_PD"] = GetPDResult(M_RESULT_LAMP_ZJ.ZNDYGGQ_PD);
                    }
                    if (!string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.ZNDYGCZPY_PD))
                    {
                        drLamp["ZNDYGCZPY_PD"] = GetPDResult(M_RESULT_LAMP_ZJ.ZNDYGCZPY_PD);
                    }
                    if (!string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.ZNDJGCZPY_PD))
                    {
                        drLamp["ZNDJGCZPY_PD"] = GetPDResult(M_RESULT_LAMP_ZJ.ZNDJGCZPY_PD);
                    }
                    if (!string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.ZNDJGSPPY_PD))
                    {
                        drLamp["ZNDJGSPPY_PD"] = GetPDResult(M_RESULT_LAMP_ZJ.ZNDJGSPPY_PD);
                    }
                    if (!string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.ZNDYGSPPY_PD))
                    {
                        drLamp["ZNDYGSPPY_PD"] = GetPDResult(M_RESULT_LAMP_ZJ.ZNDYGSPPY_PD);
                    }
                }
            }

            //右外灯
            if (!string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YWDZ_PD) && M_RESULT_LAMP_ZJ.YWDZ_PD != Nothing)
            {
                if (Convert.ToInt32(M_RESULT_LAMP_ZJ.YWDZ_PD) > 0)
                {
                    drLamp["YWDZ_PD"] = GetPDResult(M_RESULT_LAMP_ZJ.YWDZ_PD);
                    if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YWDJGDG) == false)
                    {
                        drLamp["YWDJGDG"] = M_RESULT_LAMP_ZJ.YWDJGDG;
                    }
                    if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YWDYGDG) == false)
                    {
                        drLamp["YWDYGDG"] = M_RESULT_LAMP_ZJ.YWDYGDG;
                    }
                    if (M_RESULT_LAMP_ZJ.YWDYGGQ_PD == "2")
                    {
                        drLamp["YWDYGGQ"] = M_RESULT_LAMP_ZJ.YWDYGGQ + FlagFails;
                        if (!dicYQFailItems.ContainsKey("YWDYGGQ"))
                        {
                            dicYQFailItems.Add("YWDYGGQ", "右外灯远光光强不合格、");
                        }
                        else
                        {
                            dicYQFailItems["YWDYGGQ"] = "右外灯远光光强不合格、";
                        }
                    }
                    else
                    {
                        if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YWDYGGQ) == false)
                        {
                            drLamp["YWDYGGQ"] = M_RESULT_LAMP_ZJ.YWDYGGQ;
                        }
                        if (dicYQFailItems.ContainsKey("YWDYGGQ"))
                        {
                            dicYQFailItems["YWDYGGQ"] = "";
                        }
                    }

                    if (M_RESULT_LAMP_ZJ.YWDYGCZPY_PD == "2")
                    {
                        drLamp["YWDYGCZPY"] = M_RESULT_LAMP_ZJ.YWDYGCZPY + FlagFails;
                        if (!dicYQFailItems.ContainsKey("YWDYGCZPY"))
                        {
                            dicYQFailItems.Add("YWDYGCZPY", "右外灯远光垂直偏移不合格、");
                        }
                        else
                        {
                            dicYQFailItems["YWDYGCZPY"] = "右外灯远光垂直偏移不合格、";
                        }
                    }
                    else
                    {
                        if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YWDYGCZPY) == false)
                        {
                            drLamp["YWDYGCZPY"] = M_RESULT_LAMP_ZJ.YWDYGCZPY;
                        }

                        if (dicYQFailItems.ContainsKey("YWDYGCZPY"))
                        {
                            dicYQFailItems["YWDYGCZPY"] = "";
                        }
                    }

                    if (M_RESULT_LAMP_ZJ.YWDYGSPPY_PD == "2")
                    {
                        drLamp["YWDYGSPPYL"] = M_RESULT_LAMP_ZJ.YWDYGSPPYL + FlagFails;
                        if (!dicYQFailItems.ContainsKey("YWDYGSPPYL"))
                        {
                            dicYQFailItems.Add("YWDYGSPPYL", "右外灯远光水平偏移不合格、");
                        }
                        else
                        {
                            dicYQFailItems["YWDYGSPPYL"] = "右外灯远光水平偏移不合格、";
                        }
                    }
                    else
                    {
                        if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YWDYGSPPYL) == false)
                        {
                            drLamp["YWDYGSPPYL"] = M_RESULT_LAMP_ZJ.YWDYGSPPYL;
                        }
                        if (!dicYQFailItems.ContainsKey("YWDYGSPPYL"))
                        {
                            dicYQFailItems.Add("YWDYGSPPYL", "");
                        }
                    }

                    if (M_RESULT_LAMP_ZJ.YWDJGCZPY_PD == "2")
                    {
                        drLamp["YWDJGCZPY"] = M_RESULT_LAMP_ZJ.YWDJGCZPY + FlagFails;
                        if (!dicYQFailItems.ContainsKey("YWDJGCZPY"))
                        {
                            dicYQFailItems.Add("YWDJGCZPY", "右外灯近光垂直偏移不合格、");
                        }
                        else
                        {
                            dicYQFailItems["YWDJGCZPY"] = "右外灯近光垂直偏移不合格、";
                        }
                    }
                    else
                    {
                        if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YWDJGCZPY) == false)
                        {
                            drLamp["YWDJGCZPY"] = M_RESULT_LAMP_ZJ.YWDJGCZPY;
                        }
                        if (dicYQFailItems.ContainsKey("YWDJGCZPY"))
                        {
                            dicYQFailItems["YWDJGCZPY"] = "";
                        }
                    }

                    if (M_RESULT_LAMP_ZJ.YWDJGSPPY_PD == "2")
                    {
                        drLamp["YWDJGSPPYL"] = M_RESULT_LAMP_ZJ.YWDJGSPPYL + FlagFails;
                        if (!dicYQFailItems.ContainsKey("YWDJGSPPYL"))
                        {
                            dicYQFailItems.Add("YWDJGSPPYL", "右外灯近光水平偏移不合格、");
                        }
                        else
                        {
                            dicYQFailItems["YWDJGSPPYL"] = "右外灯近光水平偏移不合格、";
                        }
                    }
                    else
                    {
                        if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YWDJGSPPYL) == false)
                        {
                            drLamp["YWDJGSPPYL"] = M_RESULT_LAMP_ZJ.YWDJGSPPYL;
                        }
                        if (dicYQFailItems.ContainsKey("YWDJGSPPYL"))
                        {
                            dicYQFailItems["YWDJGSPPYL"] = "";
                        }
                    }

                    if (!string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YWDYGGQ_PD))
                    {
                        drLamp["YWDYGGQ_PD"] = GetPDResult(M_RESULT_LAMP_ZJ.YWDYGGQ_PD);
                    }
                    if (!string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YWDYGCZPY_PD))
                    {
                        drLamp["YWDYGCZPY_PD"] = GetPDResult(M_RESULT_LAMP_ZJ.YWDYGCZPY_PD);
                    }
                    if (!string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YWDJGCZPY_PD))
                    {
                        drLamp["YWDJGCZPY_PD"] = GetPDResult(M_RESULT_LAMP_ZJ.YWDJGCZPY_PD);
                    }
                    if (!string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YWDJGSPPY_PD))
                    {
                        drLamp["YWDJGSPPY_PD"] = GetPDResult(M_RESULT_LAMP_ZJ.YWDJGSPPY_PD);
                    }
                    if (!string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YWDYGSPPY_PD))
                    {
                        drLamp["YWDYGSPPY_PD"] = GetPDResult(M_RESULT_LAMP_ZJ.YWDYGSPPY_PD);
                    }
                }
            }

            //右内灯
            if (!string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YNDZ_PD) && M_RESULT_LAMP_ZJ.YNDZ_PD != Nothing)
            {
                if (Convert.ToInt32(M_RESULT_LAMP_ZJ.YNDZ_PD) > 0)
                {
                    drLamp["YNDZ_PD"] = GetPDResult(M_RESULT_LAMP_ZJ.YNDZ_PD);
                    if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YNDJGDG) == false)
                    {
                        drLamp["YNDJGDG"] = M_RESULT_LAMP_ZJ.YNDJGDG;
                    }
                    if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YNDYGDG) == false)
                    {
                        drLamp["YNDYGDG"] = M_RESULT_LAMP_ZJ.YNDYGDG;
                    }
                    if (M_RESULT_LAMP_ZJ.YNDYGGQ_PD == "2")
                    {
                        drLamp["YNDYGGQ"] = M_RESULT_LAMP_ZJ.YNDYGGQ + FlagFails;
                        if (!dicYQFailItems.ContainsKey("YNDYGGQ"))
                        {
                            dicYQFailItems.Add("YNDYGGQ", "右内灯远光光强不合格、");
                        }
                        else
                        {
                            dicYQFailItems["YNDYGGQ"] = "右内灯远光光强不合格、";
                        }
                    }
                    else
                    {
                        if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YNDYGGQ) == false)
                        {
                            drLamp["YNDYGGQ"] = M_RESULT_LAMP_ZJ.YNDYGGQ;
                        }

                        if (dicYQFailItems.ContainsKey("YNDYGGQ"))
                        {
                            dicYQFailItems["YNDYGGQ"] = "";
                        }
                    }

                    if (M_RESULT_LAMP_ZJ.YNDYGCZPY_PD == "2")
                    {
                        drLamp["YNDYGCZPY"] = M_RESULT_LAMP_ZJ.YNDYGCZPY + FlagFails;
                        if (!dicYQFailItems.ContainsKey("YNDYGCZPY"))
                        {
                            dicYQFailItems.Add("YNDYGCZPY", "右内灯远光垂直偏移不合格、");
                        }
                        else
                        {
                            dicYQFailItems["YNDYGCZPY"] = "右内灯远光垂直偏移不合格、";
                        }
                    }
                    else
                    {

                        if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YNDYGCZPY) == false)
                        {
                            drLamp["YNDYGCZPY"] = M_RESULT_LAMP_ZJ.YNDYGCZPY;
                        }
                        if (dicYQFailItems.ContainsKey("YNDYGCZPY"))
                        {
                            dicYQFailItems["YNDYGCZPY"] = "";
                        }
                    }

                    if (M_RESULT_LAMP_ZJ.YNDYGSPPY_PD == "2")
                    {
                        drLamp["YNDYGSPPYL"] = M_RESULT_LAMP_ZJ.YNDYGSPPYL + FlagFails;
                        if (!dicYQFailItems.ContainsKey("YNDYGSPPYL"))
                        {
                            dicYQFailItems.Add("YNDYGSPPYL", "右内灯远光水平偏移不合格、");
                        }
                        else
                        {
                            dicYQFailItems["YNDYGSPPYL"] = "右内灯远光水平偏移不合格、";
                        }
                    }
                    else
                    {

                        if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YNDYGSPPYL) == false)
                        {
                            drLamp["YNDYGSPPYL"] = M_RESULT_LAMP_ZJ.YNDYGSPPYL;
                        }
                        if (dicYQFailItems.ContainsKey("YNDYGSPPYL"))
                        {
                            dicYQFailItems["YNDYGSPPYL"] = "";
                        }
                    }

                    if (M_RESULT_LAMP_ZJ.YNDJGCZPY_PD == "2")
                    {
                        drLamp["YNDJGCZPY"] = M_RESULT_LAMP_ZJ.YNDJGCZPY + FlagFails;
                        if (!dicYQFailItems.ContainsKey("YNDJGCZPY"))
                        {
                            dicYQFailItems.Add("YNDJGCZPY", "右内灯近光垂直偏移不合格、");
                        }
                        else
                        {
                            dicYQFailItems["YNDJGCZPY"] = "右内灯近光垂直偏移不合格、";
                        }
                    }
                    else
                    {

                        if (string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YNDJGCZPY) == false)
                        {
                            drLamp["YNDJGCZPY"] = M_RESULT_LAMP_ZJ.YNDJGCZPY;
                        }
                        if (dicYQFailItems.ContainsKey("YNDJGCZPY"))
                        {
                            dicYQFailItems["YNDJGCZPY"] = "";
                        }
                    }

                    if (M_RESULT_LAMP_ZJ.YNDJGSPPY_PD == "2")
                    {
                        drLamp["YNDJGSPPYL"] = M_RESULT_LAMP_ZJ.YNDJGSPPYL + FlagFails;
                        if (!dicYQFailItems.ContainsKey("YNDJGSPPYL"))
                        {
                            dicYQFailItems.Add("YNDJGSPPYL", "右内灯近光水平偏移不合格、");
                        }
                        else
                        {
                            dicYQFailItems["YNDJGSPPYL"] = "右内灯近光水平偏移不合格、";
                        }
                    }
                    else
                    {
                        drLamp["YNDJGSPPYL"] = M_RESULT_LAMP_ZJ.YNDJGSPPYL;
                        if (dicYQFailItems.ContainsKey("YNDJGSPPYL"))
                        {
                            dicYQFailItems["YNDJGSPPYL"] = "";
                        }
                    }

                    if (!string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YNDYGGQ_PD))
                    {
                        drLamp["YNDYGGQ_PD"] = GetPDResult(M_RESULT_LAMP_ZJ.YNDYGGQ_PD);
                    }
                    if (!string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YNDYGCZPY_PD))
                    {
                        drLamp["YNDYGCZPY_PD"] = GetPDResult(M_RESULT_LAMP_ZJ.YNDYGCZPY_PD);
                    }
                    if (!string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YNDJGCZPY_PD))
                    {
                        drLamp["YNDJGCZPY_PD"] = GetPDResult(M_RESULT_LAMP_ZJ.YNDJGCZPY_PD);
                    }
                    if (!string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YNDJGSPPY_PD))
                    {
                        drLamp["YNDJGSPPY_PD"] = GetPDResult(M_RESULT_LAMP_ZJ.YNDJGSPPY_PD);
                    }
                    if (!string.IsNullOrEmpty(M_RESULT_LAMP_ZJ.YNDYGSPPY_PD))
                    {
                        drLamp["YNDYGSPPY_PD"] = GetPDResult(M_RESULT_LAMP_ZJ.YNDYGSPPY_PD);
                    }
                }
            }
            dtLamp.Rows.Add(drLamp);
            #endregion

            #region dtOthers
            if (M_RESULT_IMAGE.Brake_Image != null)
            {
                drOthers["Image1"] = M_RESULT_IMAGE.Brake_Image;
            }
            if (M_RESULT_IMAGE.Lamp_Image != null)
            {
                drOthers["Image2"] = M_RESULT_IMAGE.Lamp_Image;
            }
            if (M_RESULT_IMAGE.Power_Image != null)
            {
                drOthers["Image3"] = M_RESULT_IMAGE.Power_Image;
            }

            if (!string.IsNullOrEmpty(M_RESULT_SPEED.SD_PD) && M_RESULT_SPEED.SD_PD != Nothing)
            {
                if (Convert.ToInt32(M_RESULT_SPEED.SD_PD) > 0)
                {
                    drOthers["SCSD"] = M_RESULT_SPEED.SCSD;
                    drOthers["SD_PD"] = GetPDResult(M_RESULT_SPEED.SD_PD);
                    if (M_RESULT_SPEED.SD_PD == "2")
                    {
                        if (!dicYQFailItems.ContainsKey("SD_PD"))
                        {
                            dicYQFailItems.Add("SD_PD", "车速表不合格、");
                        }
                        else
                        {
                            dicYQFailItems["SD_PD"] = "车速表不合格、";
                        }
                    }
                    else
                    {
                        if (dicYQFailItems.ContainsKey("SD_PD"))
                        {
                            dicYQFailItems["SD_PD"] = "";
                        }
                    }
                }
            }

            if (!string.IsNullOrEmpty(M_RESULT_SIDESLIP.QQCH_PD) && M_RESULT_SIDESLIP.QQCH_PD != Nothing)
            {
                if (Convert.ToInt32(M_RESULT_SIDESLIP.QQCH_PD) > 0)
                {
                    drOthers["QQCHSCZ"] = M_RESULT_SIDESLIP.QQCHSCZ;
                    drOthers["QQCH_PD"] = GetPDResult(M_RESULT_SIDESLIP.QQCH_PD);
                    if (M_RESULT_SIDESLIP.QQCH_PD == "2")
                    {
                        if (!dicYQFailItems.ContainsKey("QQCH_PD"))
                        {
                            dicYQFailItems.Add("QQCH_PD", "第一转向轮不合格、");
                        }
                        else
                        {
                            dicYQFailItems["QQCH_PD"] = "第一转向轮不合格、";
                        }
                    }
                    else
                    {
                        if (dicYQFailItems.ContainsKey("QQCH_PD"))
                        {
                            dicYQFailItems["QQCH_PD"] = "";
                        }
                    }
                }
            }

            if (!string.IsNullOrEmpty(M_RESULT_SIDESLIP.HQCH_PD) && M_RESULT_SIDESLIP.HQCH_PD != Nothing)
            {
                if (Convert.ToInt32(M_RESULT_SIDESLIP.HQCH_PD) > 0)
                {
                    drOthers["HQCHSCZ"] = M_RESULT_SIDESLIP.HQCHSCZ;
                    drOthers["HQCH_PD"] = GetPDResult(M_RESULT_SIDESLIP.HQCH_PD);
                    if (M_RESULT_SIDESLIP.HQCH_PD == "2")
                    {
                        if (!dicYQFailItems.ContainsKey("HQCH_PD"))
                        {
                            dicYQFailItems.Add("HQCH_PD", "第二转向轮不合格、");
                        }
                        else
                        {
                            dicYQFailItems["HQCH_PD"] = "第二转向轮不合格、";
                        }
                    }
                    else
                    {
                        if (dicYQFailItems.ContainsKey("HQCH_PD"))
                        {
                            dicYQFailItems["HQCH_PD"] = "";
                        }
                    }
                }

                if (!string.IsNullOrEmpty(M_RESULT_SPEAKER.SJZ_PD) && M_RESULT_SPEAKER.SJZ_PD != Nothing)
                {
                    if (Convert.ToInt32(M_RESULT_SPEAKER.SJZ_PD) > 0)
                    {
                        drOthers["SCSJZ"] = M_RESULT_SPEAKER.SCSJZ;
                        drOthers["SJZ_PD"] = GetPDResult(M_RESULT_SPEAKER.SJZ_PD);
                        if (M_RESULT_SPEAKER.SJZ_PD == "2")
                        {
                            if (!dicYQFailItems.ContainsKey("SJZ_PD"))
                            {
                                dicYQFailItems.Add("SJZ_PD", "声压级不合格、");
                            }
                            else
                            {
                                dicYQFailItems["SJZ_PD"] = "声压级不合格、";
                            }
                        }
                        else
                        {
                            if (dicYQFailItems.ContainsKey("SJZ_PD"))
                            {
                                dicYQFailItems["SJZ_PD"] = "";
                            }
                        }
                    }
                }
            }

            string strFailItems = "";
            var vFailKeys = dicYQFailItems.Keys.ToList();
            for (int m = 0; m < dicYQFailItems.Keys.Count; m++)
            {
                if (string.IsNullOrEmpty(dicYQFailItems[vFailKeys[m]]) == false)
                {
                    strFailItems += dicYQFailItems[vFailKeys[m]];
                }
            }

            if (string.IsNullOrEmpty(strFailItems))
            {
                strFailItems = NothingC;
            }

            drOthers["FailItems"] = strFailItems;
            dtOthers.Rows.Add(drOthers);
            #endregion

            lstDt.Add(dtDPCG);
            lstDt.Add(dtBrake);
            lstDt.Add(dtBrakeD);
            lstDt.Add(dtLS);
            lstDt.Add(dtPF);
            lstDt.Add(dtXJ);
            lstDt.Add(dtLamp);
            lstDt.Add(dtOthers);

            return lstDt;
        }

        /// <summary>
        /// 绑定综检仪器报告单
        /// </summary>
        /// <param name="ds"></param>
        /// <returns></returns>
        public DataSet BindReportResource_YQ(DataSet ds)
        {
            DataTable dtBase = GetDataTableYQ_Base(ds.Tables["dtBase"]);
            List<DataTable> lstDataTable = GetDataTablesYQ_XN(ds);

            return ds;
        }
        /// <summary>
        /// 得到技术等级结果
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        public string GetPDResultDJ(string str)
        {
            string strValue = "";
            if (!string.IsNullOrEmpty(str.Trim()))
            {
                switch (str.Trim())
                {
                    case "1"://合格
                        strValue = PassC;
                        break;
                    case "2"://不合格
                        strValue = FailC;
                        break;
                    case "0"://未检
                        strValue = NoTest;
                        break;
                    case "3"://不判定
                        strValue = NoAudit;
                        break;
                    case "-":
                        strValue = Nothing;
                        break;
                    case "10":
                        strValue = Level1;
                        break;
                    case "11":
                        strValue = Level2;
                        break;
                    default:
                        strValue = Nothing;
                        break;
                }
            }
            else
            {
                strValue = Nothing;
            }

            return strValue;
        }
        #endregion

        #region 技术等级评定部分
        /// <summary>
        /// 得到技术等级评定外检表的基本信息部分
        /// </summary>
        /// <param name="dtBase"></param>
        /// <returns></returns>
        public DataTable GetDataTableJSDJ_Base(DataTable dtBase)
        {
            DataRow drBase = dtBase.NewRow();
            drBase["JCLSH"] = JCLSH;
            if (IsGC == false || IsQCLC)   //非挂车  汽车列车
            {
                drBase["JCRQ"] = Vehicle_Info.JCRQ;
                drBase["HPHM"] = Vehicle_Info.HPHM;
                if (bShowAllJCLSH)
                {
                    drBase["BGDBH"] = Vehicle_Info.ZJLSH;
                }
                else
                {
                    drBase["BGDBH"] = Vehicle_Info.ZJLSH;
                }
                drBase["SYR"] = Vehicle_Info.SYR;
                drBase["HPZL"] = Vehicle_Info.HPZL;
                drBase["GLCHPHM"] = Nothing;
            }
            else
            {
                drBase["GLCHPHM"] = Vehicle_Info.HPHM;
            }

            dtBase.Rows.Add(drBase);
            return dtBase;
        }

        /// <summary>
        /// 得到技术等级评定外检表判定部分
        /// </summary>
        /// <param name="dtPD"></param>
        /// <returns></returns>
        public DataTable GetDataTableJSDJ_PD(DataTable dtPD)
        {
            DataRow drPD = dtPD.NewRow();
            drPD["JCLSH"] = JCLSH;

            if (!bTestRG)
            {
                drPD = SetDataTableDefaultValue(ref dtPD, Nothing);
            }
            else
            {
                RESULT_CHASISS_MANUAL_ZJ_BLL manual = new RESULT_CHASISS_MANUAL_ZJ_BLL();
                RESULT_OVERALLSIZE_BLL over_bll = new RESULT_OVERALLSIZE_BLL();

                RESULT_CHASISS_MANUAL_ZJ M_RESULT_CHASISS_MANUAL_ZJ = new RESULT_CHASISS_MANUAL_ZJ();
                RESULT_CHASISS_MANUAL_ZJ T_RESULT_CHASISS_MANUAL_ZJ = new RESULT_CHASISS_MANUAL_ZJ();
                RESULT_OVERALLSIZE M_RESULT_OVERALLSIZE = new RESULT_OVERALLSIZE();
                RESULT_OVERALLSIZE T_RESULT_OVERALLSIZE = new RESULT_OVERALLSIZE();

                ModelReflection mR = new ModelReflection();

                for (int i = 0; i < lstJCLSH.Count; i++)
                {
                    T_RESULT_CHASISS_MANUAL_ZJ = manual.GetModel(lstJCLSH[i]);
                    T_RESULT_OVERALLSIZE = over_bll.GetModel(lstJCLSH[i]);
                    if (i == 0)
                    {
                        M_RESULT_CHASISS_MANUAL_ZJ = T_RESULT_CHASISS_MANUAL_ZJ;
                        M_RESULT_OVERALLSIZE = T_RESULT_OVERALLSIZE;
                    }

                    mR.AutoMapping(T_RESULT_CHASISS_MANUAL_ZJ, M_RESULT_CHASISS_MANUAL_ZJ);
                    mR.AutoMapping(T_RESULT_OVERALLSIZE, M_RESULT_OVERALLSIZE);
                }


                drPD["PD_1"] = GetPDResultDJ(M_RESULT_CHASISS_MANUAL_ZJ.PSZDQ_PD);
                drPD["PD_2"] = GetPDResultDJ(M_RESULT_CHASISS_MANUAL_ZJ.ZDJXZDTZZZ_PD);
                drPD["PD_3"] = GetPDResultDJ(M_RESULT_CHASISS_MANUAL_ZJ.YSKQGZHYSFLZZ_PD);
                drPD["PD_4"] = GetPDResultDJ(M_RESULT_CHASISS_MANUAL_ZJ.XSGNXXZZ_PD);
                drPD["PD_5"] = GetPDResultDJ(M_RESULT_CHASISS_MANUAL_ZJ.FDJCNZDMHZZ_PD);
                drPD["PD_6"] = GetPDResultDJ(M_RESULT_CHASISS_MANUAL_ZJ.HSQHQTFZZZ_PD);
                drPD["PD_7"] = GetPDResultDJ(M_RESULT_CHASISS_MANUAL_ZJ.ZDFBSZZ_PD);
                drPD["PD_8"] = GetPDResultDJ(M_RESULT_CHASISS_MANUAL_ZJ.ZWXLT_PD);
                drPD["PD_9"] = GetPDResultDJ(M_RESULT_CHASISS_MANUAL_ZJ.AQD_PD);
                drPD["PD_10"] = GetPDResultDJ(M_RESULT_CHASISS_MANUAL_ZJ.WXDWXTCZZD_PD);

                if (!string.IsNullOrEmpty(M_RESULT_CHASISS_MANUAL_ZJ.RGJYBHGX.Trim()))
                {
                    for (int j = 11; j < 87; j++)
                    {
                        drPD["PD_" + j] = Pass;
                    }

                    if (M_RESULT_CHASISS_MANUAL_ZJ.RGJYBHGX != Nothing)
                    {
                        string strRG = M_RESULT_CHASISS_MANUAL_ZJ.RGJYBHGX.Substring(0, M_RESULT_CHASISS_MANUAL_ZJ.RGJYBHGX.Length - 1);
                        if (strRG.IndexOf(',') > 0)
                        {
                            var items = strRG.Split(',');
                            foreach (var v in items)
                            {
                                string strIndex = GetIndexChangedJSDJ(v);
                                drPD["PD_" + strIndex] = Fail;
                            }
                        }
                        else
                        {
                            if (!string.IsNullOrEmpty(strRG))
                            {
                                string strIndex = GetIndexChangedJSDJ(strRG);
                                drPD["PD_" + strIndex] = Fail;
                            }
                        }
                    }
                    else
                    {
                        for (int j = 11; j < 87; j++)
                        {
                            drPD["PD_" + j] = Pass;
                        }
                    }
                }
                else
                {
                    for (int j = 11; j < 87; j++)
                    {
                        drPD["PD_" + j] = Pass;
                    }
                }

                if (!string.IsNullOrEmpty(M_RESULT_CHASISS_MANUAL_ZJ.DGJYBHGX.Trim()))
                {
                    for (int j = 87; j < 104; j++)
                    {
                        drPD["PD_" + j] = Pass;
                    }

                    if (M_RESULT_CHASISS_MANUAL_ZJ.DGJYBHGX != Nothing)
                    {
                        string strDG = M_RESULT_CHASISS_MANUAL_ZJ.DGJYBHGX.Substring(0, M_RESULT_CHASISS_MANUAL_ZJ.DGJYBHGX.Length - 1);
                        if (strDG.IndexOf(',') > 0)
                        {
                            var items = strDG.Split(',');
                            foreach (var v in items)
                            {
                                string strIndex = GetIndexChangedJSDJ(v);
                                drPD["PD_" + strIndex] = Fail;
                            }
                        }
                        else
                        {
                            if (!string.IsNullOrEmpty(strDG))
                            {
                                string strIndex = GetIndexChangedJSDJ(strDG);
                                drPD["PD_" + strIndex] = Fail;
                            }
                        }
                    }
                    else
                    {
                        for (int j = 84; j < 101; j++)
                        {
                            drPD["PD_" + j] = Pass;
                        }
                    }
                }
                else
                {
                    for (int j = 84; j < 101; j++)
                    {
                        drPD["PD_" + j] = Pass;
                    }
                }

                if (!string.IsNullOrEmpty(M_RESULT_CHASISS_MANUAL_ZJ.RGJYBJCX.Trim()))
                {
                    var strBPDXItem = M_RESULT_CHASISS_MANUAL_ZJ.RGJYBJCX.Substring(0, M_RESULT_CHASISS_MANUAL_ZJ.RGJYBJCX.Length - 1);
                    if (strBPDXItem.Contains(","))
                    {
                        var strBPDXList = strBPDXItem.Split(',');
                        foreach (var v in strBPDXList)
                        {
                            string strIndex = GetIndexChangedJSDJ(v);
                            drPD["PD_" + strIndex] = NoAudit;
                        }
                    }
                    else
                    {
                        string strIndex = GetIndexChangedJSDJ(strBPDXItem);
                        drPD["PD_" + strIndex] = NoAudit;
                    }
                }

                if (!string.IsNullOrEmpty(M_RESULT_CHASISS_MANUAL_ZJ.DGJYBJCX.Trim()))
                {
                    var strBPDXItem = M_RESULT_CHASISS_MANUAL_ZJ.DGJYBJCX.Substring(0, M_RESULT_CHASISS_MANUAL_ZJ.DGJYBJCX.Length - 1);
                    if (strBPDXItem.Contains(","))
                    {
                        var strBPDXList = strBPDXItem.Split(',');
                        foreach (var v in strBPDXList)
                        {
                            string strIndex = GetIndexChangedJSDJ(v);
                            drPD["PD_" + strIndex] = NoAudit;
                        }
                    }
                    else
                    {
                        string strIndex = GetIndexChangedJSDJ(strBPDXItem);
                        drPD["PD_" + strIndex] = NoAudit;
                    }
                }

                //轮胎花纹深度
                drPD["PD_104"] = GetPDResultDJ(M_RESULT_CHASISS_MANUAL_ZJ.LTHWSD_PD);
                //门窗玻璃
                drPD["PD_105"] = GetPDResultDJ(M_RESULT_CHASISS_MANUAL_ZJ.MCBL_PD);
                //车身与驾驶室
                drPD["PD_106"] = GetPDResultDJ(M_RESULT_CHASISS_MANUAL_ZJ.CSYJSSL_PD);
                //对称部位高度差
                drPD["PD_107"] = GetPDResultDJ(M_RESULT_CHASISS_MANUAL_ZJ.DCBWGDC_PD);
                //车身表面涂装
                drPD["PD_108"] = GetPDResultDJ(M_RESULT_CHASISS_MANUAL_ZJ.CSBMTZ_PD);
                //最大自由转动量
                drPD["PD_109"] = GetPDResultDJ(M_RESULT_CHASISS_MANUAL_ZJ.ZXPZDZYZDL_PD);
                //车身外廓尺寸
                drPD["PD_110"] = Nothing;
                //挂车
                drPD["PD_111"] = Nothing;
                //汽车列车
                drPD["PD_112"] = Nothing;

                if (string.IsNullOrEmpty(M_RESULT_OVERALLSIZE.JCLSH) == false)
                {
                    drPD["PD_110"] = GetPDResult(M_RESULT_OVERALLSIZE.ZCWKCC_PD);
                    if (IsGC)
                    {
                        drPD["PD_111"] = GetPDResult(M_RESULT_OVERALLSIZE.GCWKCC_PD);
                    }

                    if (IsQCLC)
                    {
                        drPD["PD_112"] = GetPDResult(M_RESULT_OVERALLSIZE.ZCWKCC_PD);
                    }
                }


                //车身栏板高度
                drPD["PD_113"] = Nothing;
                drPD["PD_114"] = Nothing;
                if (!string.IsNullOrEmpty(M_RESULT_CHASISS_MANUAL_ZJ.CXLBGD))
                {
                    if (M_RESULT_CHASISS_MANUAL_ZJ.CXLBGD.Contains(";"))
                    {
                        string[] strItems = M_RESULT_CHASISS_MANUAL_ZJ.CXLBGD.Split(';');
                        string[] strDCItems = strItems[0].Split(',');
                        string[] strGCItems = strItems[1].Split(',');
                        drPD["PD_113"] = GetPDResult(strDCItems[1]);

                        if (IsGC)
                        {
                            drPD["PD_114"] = GetPDResult(strGCItems[1]);
                        }
                    }
                }
            }

            dtPD.Rows.Add(drPD);
            return dtPD;
        }

        /// <summary>
        /// 得到技术等级评定其他部分
        /// </summary>
        /// <param name="dtOthers"></param>
        /// <returns></returns>
        public DataTable GetDataTableJSDJ_Others(DataTable dtOthers)
        {
            DataRow drOthers = dtOthers.NewRow();
            drOthers["JCLSH"] = JCLSH;

            RESULT_CHASISS_MANUAL_ZJ_BLL manual = new RESULT_CHASISS_MANUAL_ZJ_BLL();
            RESULT_OVERALLSIZE_BLL over_bll = new RESULT_OVERALLSIZE_BLL();

            RESULT_CHASISS_MANUAL_ZJ M_RESULT_CHASISS_MANUAL_ZJ = new RESULT_CHASISS_MANUAL_ZJ();
            RESULT_CHASISS_MANUAL_ZJ T_RESULT_CHASISS_MANUAL_ZJ = new RESULT_CHASISS_MANUAL_ZJ();
            RESULT_OVERALLSIZE M_RESULT_OVERALLSIZE = new RESULT_OVERALLSIZE();
            RESULT_OVERALLSIZE T_RESULT_OVERALLSIZE = new RESULT_OVERALLSIZE();

            ModelReflection mR = new ModelReflection();

            for (int i = 0; i < lstJCLSH.Count; i++)
            {
                T_RESULT_CHASISS_MANUAL_ZJ = manual.GetModel(lstJCLSH[i]);
                T_RESULT_OVERALLSIZE = over_bll.GetModel(lstJCLSH[i]);
                if (i == 0)
                {
                    M_RESULT_CHASISS_MANUAL_ZJ = T_RESULT_CHASISS_MANUAL_ZJ;
                    M_RESULT_OVERALLSIZE = T_RESULT_OVERALLSIZE;
                }

                mR.AutoMapping(T_RESULT_CHASISS_MANUAL_ZJ, M_RESULT_CHASISS_MANUAL_ZJ);
                mR.AutoMapping(T_RESULT_OVERALLSIZE, M_RESULT_OVERALLSIZE);
            }

            //得到汇总的不合格项目，包括人工和地沟
            List<int> lstSum = new List<int>();

            //轮胎花纹深度
            if (!string.IsNullOrEmpty(M_RESULT_CHASISS_MANUAL_ZJ.LTHWSD))
            {
                drOthers["LTHWSD_ZXL"] = ZJGetLTHWSH(M_RESULT_CHASISS_MANUAL_ZJ.LTHWSD, 0);
                drOthers["LTHWSD_QTL"] = ZJGetLTHWSH(M_RESULT_CHASISS_MANUAL_ZJ.LTHWSD, 1);
                drOthers["LTHWSD_GC"] = ZJGetLTHWSH(M_RESULT_CHASISS_MANUAL_ZJ.LTHWSD, 2);
            }
            else
            {
                drOthers["LTHWSD_ZXL"] = Empty;
                drOthers["LTHWSD_QTL"] = Empty;
                drOthers["LTHWSD_GC"] = Empty;
            }

            //门窗玻璃
            if (!string.IsNullOrEmpty(M_RESULT_CHASISS_MANUAL_ZJ.MCBL))
            {
                string[] strDeatails = M_RESULT_CHASISS_MANUAL_ZJ.MCBL.Split(',');
                drOthers["MCBL_SFWH"] = strDeatails[0];
                drOthers["MCBL_25_1"] = strDeatails[1] == "1" ? Check : Empty;
                drOthers["MCBL_25_0"] = strDeatails[1] == "0" ? Check : Empty;
                drOthers["MCBL_MF_0"] = strDeatails[2] == "0" ? Check : Empty;
                drOthers["MCBL_MF_1"] = strDeatails[2] == "1" ? Check : Empty;
            }
            else
            {
                drOthers["MCBL_SFWH"] = Check;
                drOthers["MCBL_25_1"] = Empty;
                drOthers["MCBL_25_0"] = Check;
                drOthers["MCBL_MF_0"] = Empty;
                drOthers["MCBL_MF_1"] = Check;
            }

            //车身与驾驶室
            if (!string.IsNullOrEmpty(M_RESULT_CHASISS_MANUAL_ZJ.CSYJSS))
            {
                string[] strLst = M_RESULT_CHASISS_MANUAL_ZJ.CSYJSS.Split(';');
                string[] strDeatails = strLst[0].Split(',');
                drOthers["CSYJSS_LHSL"] = strDeatails[0];
                drOthers["CSYJSS_LHSL_1"] = strDeatails[1] == "1" ? Check : Empty;
                drOthers["CSYJSS_LHSL_0"] = strDeatails[1] == "0" ? Check : Empty;
            }
            else
            {
                drOthers["CSYJSS_LHSL"] = "0";
                drOthers["CSYJSS_LHSL_1"] = Empty;
                drOthers["CSYJSS_LHSL_0"] = Check;
            }

            //对称部位高度差
            if (!string.IsNullOrEmpty(M_RESULT_CHASISS_MANUAL_ZJ.DCBWGDC))
            {
                string[] strLst = M_RESULT_CHASISS_MANUAL_ZJ.DCBWGDC.Split(';');
                string[] strDeatails = strLst[0].Split(',');
                drOthers["DCBWGDC_DC_L1"] = strDeatails[0];
                drOthers["DCBWGDC_DC_R1"] = strDeatails[1];
                drOthers["DCBWGDC_DC_L2"] = strDeatails[2];
                drOthers["DCBWGDC_DC_R2"] = strDeatails[3];

                drOthers["DCBWGDC_GC_L1"] = Nothing;
                drOthers["DCBWGDC_GC_R1"] = Nothing;
                drOthers["DCBWGDC_GC_L2"] = Nothing;
                drOthers["DCBWGDC_GC_R2"] = Nothing;
            }
            else
            {
                drOthers["DCBWGDC_DC_L1"] = Empty;
                drOthers["DCBWGDC_DC_R1"] = Empty;
                drOthers["DCBWGDC_DC_L2"] = Empty;
                drOthers["DCBWGDC_DC_R2"] = Empty;

                drOthers["DCBWGDC_GC_L1"] = Nothing;
                drOthers["DCBWGDC_GC_R1"] = Nothing;
                drOthers["DCBWGDC_GC_L2"] = Nothing;
                drOthers["DCBWGDC_GC_R2"] = Nothing;

            }

            //车身表面涂装
            if (!string.IsNullOrEmpty(M_RESULT_CHASISS_MANUAL_ZJ.CSBMTZ))
            {
                string[] strDeatails = M_RESULT_CHASISS_MANUAL_ZJ.CSBMTZ.Split(',');
                drOthers["CSBMTZ_PS_0"] = strDeatails[0] == "0" ? Check : Empty;
                drOthers["CSBMTZ_PS_1"] = strDeatails[0] == "1" ? Check : Empty;
                drOthers["CSBMTZ_YZ_1"] = strDeatails[1] == "1" ? Check : Empty;
                drOthers["CSBMTZ_YZ_0"] = strDeatails[1] == "0" ? Check : Empty;
            }
            else
            {
                drOthers["CSBMTZ_PS_0"] = Check;
                drOthers["CSBMTZ_PS_1"] = Empty;
                drOthers["CSBMTZ_YZ_1"] = Check;
                drOthers["CSBMTZ_YZ_0"] = Empty;
            }

            //最大自由转动量
            if (!string.IsNullOrEmpty(M_RESULT_CHASISS_MANUAL_ZJ.ZXPZDZYZDL))
            {
                drOthers["ZXPZDZYZDL"] = M_RESULT_CHASISS_MANUAL_ZJ.ZXPZDZYZDL;
            }
            else
            {
                drOthers["ZXPZDZYZDL"] = Nothing;
            }

            //车身外廓尺寸
            if (string.IsNullOrEmpty(M_RESULT_OVERALLSIZE.JCLSH) == false)
            {
                drOthers["ZCSCWKCCCD"] = M_RESULT_OVERALLSIZE.ZCSCWKCCCD;
                drOthers["ZCSCWKCCGD"] = M_RESULT_OVERALLSIZE.ZCSCWKCCGD;
                drOthers["ZCSCWKCCKD"] = M_RESULT_OVERALLSIZE.ZCSCWKCCKD;
                if (string.IsNullOrEmpty(M_RESULT_OVERALLSIZE.GCSCWKCCCD.Trim()) == false)
                {
                    drOthers["GCSCWKCCCD"] = M_RESULT_OVERALLSIZE.GCSCWKCCCD;
                }
                else
                {
                    drOthers["GCSCWKCCCD"] = NoAudit;
                }
                if (string.IsNullOrEmpty(M_RESULT_OVERALLSIZE.GCSCWKCCGD.Trim()) == false)
                {
                    drOthers["GCSCWKCCGD"] = M_RESULT_OVERALLSIZE.GCSCWKCCGD;
                }
                else
                {
                    drOthers["GCSCWKCCGD"] = NoAudit;
                }
                if (string.IsNullOrEmpty(M_RESULT_OVERALLSIZE.GCSCWKCCKD.Trim()) == false)
                {
                    drOthers["GCSCWKCCKD"] = M_RESULT_OVERALLSIZE.GCSCWKCCKD;
                }
                else
                {
                    drOthers["GCSCWKCCKD"] = NoAudit;
                }
                if (string.IsNullOrEmpty(M_RESULT_OVERALLSIZE.HXSCWKCCCD.Trim()) == false)
                {
                    drOthers["HXSCWKCCCD"] = M_RESULT_OVERALLSIZE.HXSCWKCCCD;
                }
                else
                {
                    drOthers["HXSCWKCCCD"] = NoAudit;
                }
                if (string.IsNullOrEmpty(M_RESULT_OVERALLSIZE.HXSCWKCCKD.Trim()) == false)
                {
                    drOthers["HXSCWKCCKD"] = M_RESULT_OVERALLSIZE.HXSCWKCCKD;
                }
                else
                {
                    drOthers["HXSCWKCCKD"] = NoAudit;
                }
                if (string.IsNullOrEmpty(M_RESULT_OVERALLSIZE.HXSCWKCCGD.Trim()) == false)
                {
                    drOthers["HXSCWKCCGD"] = M_RESULT_OVERALLSIZE.GCSCWKCCKD;
                }
                else
                {
                    drOthers["HXSCWKCCGD"] = NoAudit;
                }
            }
            else
            {
                drOthers["ZCSCWKCCCD"] = NoAudit;
                drOthers["ZCSCWKCCGD"] = NoAudit;
                drOthers["ZCSCWKCCKD"] = NoAudit;
                drOthers["GCSCWKCCCD"] = NoAudit;
                drOthers["GCSCWKCCGD"] = NoAudit;
                drOthers["GCSCWKCCKD"] = NoAudit;
                drOthers["HXSCWKCCCD"] = NoAudit;
                drOthers["HXSCWKCCKD"] = NoAudit;
                drOthers["HXSCWKCCGD"] = NoAudit;
            }

            //车身栏板高度
            if (!string.IsNullOrEmpty(M_RESULT_CHASISS_MANUAL_ZJ.CXLBGD))
            {
                if (M_RESULT_CHASISS_MANUAL_ZJ.CXLBGD.Contains(";"))
                {
                    string[] strItems = M_RESULT_CHASISS_MANUAL_ZJ.CXLBGD.Split(';');
                    string[] strDCItems = strItems[0].Split(',');
                    string[] strGCItems = strItems[1].Split(',');
                    drOthers["CXLBGD_DC"] = strDCItems[0];
                    drOthers["CXLBGD_GC"] = NoAudit;
                }
                else
                {
                    drOthers["CXLBGD_DC"] = NoAudit;
                    drOthers["CXLBGD_GC"] = NoAudit;
                }
            }
            else
            {
                drOthers["CXLBGD_DC"] = NoAudit;
                drOthers["CXLBGD_GC"] = NoAudit;
            }

            List<int> lstRGJYBHGX = new List<int>();
            List<int> lstDGJYBHGX = new List<int>();

            if (!string.IsNullOrEmpty(M_RESULT_CHASISS_MANUAL_ZJ.RGJYBHGX.Trim()))
            {
                ZJGetItemsAndFilter(M_RESULT_CHASISS_MANUAL_ZJ.RGJYBHGX.Trim(), lstRGJYBHGX);
            }

            if (!string.IsNullOrEmpty(M_RESULT_CHASISS_MANUAL_ZJ.DGJYBHGX.Trim()))
            {
                ZJGetItemsAndFilter(M_RESULT_CHASISS_MANUAL_ZJ.DGJYBHGX.Trim(), lstDGJYBHGX);
            }

            //得到汇总的不合格项目，包括人工和地沟
            lstSum = ZJComminItems(lstRGJYBHGX, lstDGJYBHGX);

            if (lstSum.Count == 0)
            {
                drOthers["HCPDBHGX"] = NothingC;
                drOthers["WYXRZBHGX"] = NothingC;
                drOthers["GZXXZD"] = NothingC;
                drOthers["WGJC"] = NothingC;
                drOthers["YXJC"] = NothingC;
                drOthers["DPJC"] = NothingC;
                drOthers["FJXBHGX"] = NothingC;
                drOthers["CLXBHGX"] = NothingC;
            }

            var lstEnd = new List<int>();
            foreach (var v in lstSum)
            {
                lstEnd.Add(Convert.ToInt32(GetIndexChangedJSDJ(v.ToString())));
            }

            string strGC = "";
            if (IsGC)
            {
                strGC = "G";
            }
            foreach (var v in lstEnd)
            {
                if (v < 11)
                {
                    drOthers["HCPDBHGX"] += strGC + v.ToString() + "、";
                }
                else if (v > 10 && v < 20)
                {
                    drOthers["WYXRZBHGX"] += strGC + v.ToString() + "、";
                }
                else if (v > 19 && v < 24)
                {
                    drOthers["GZXXZD"] += strGC + v.ToString() + "、";
                }
                else if (v > 23 && v < 72)
                {
                    drOthers["WGJC"] += strGC + v.ToString() + "、";
                }
                else if (v > 71 && v < 87)
                {
                    drOthers["YXJC"] += strGC + v.ToString() + "、";
                }
                else if (v > 86 && v < 104)
                {
                    drOthers["DPJC"] += strGC + v.ToString() + "、";
                }
                else if (v > 103 && v < 110)
                {
                    drOthers["FJXBHGX"] += strGC + v.ToString() + "、";
                }
                else if (v > 109 && v < 112)
                {
                    drOthers["CLXBHGX"] += strGC + v.ToString() + "、";
                }
            }

            dtOthers.Rows.Add(drOthers);
            return dtOthers;
        }

        /// <summary>
        /// 绑定综检技术等级评定报告单
        /// </summary>
        /// <param name="ds"></param>
        /// <returns></returns>
        public DataSet BindReportResource_JSDJPD(DataSet ds)
        {
            DataTable dtBase = GetDataTableJSDJ_Base(ds.Tables["dtBase"]);
            DataTable dtPD = GetDataTableJSDJ_PD(ds.Tables["dtPD"]);
            DataTable dtOthers = GetDataTableJSDJ_Others(ds.Tables["dtOthers"]);
           
            return ds;
        }

        /// <summary>
        /// 技术等级评定得到轮胎花纹深度内容
        /// </summary>
        /// <param name="strValue"></param>
        /// <param name="iIndex"></param>
        /// <returns></returns>
        private string ZJGetLTHWSH(string strValue, int iIndex)
        {
            string strRet = "";
            try
            {
                if (strValue.Contains(";"))
                {
                    string[] strFir = strValue.Split(';');
                    string[] strSec = strFir[iIndex].Split(',');
                    foreach (var v in strSec)
                    {
                        if (!string.IsNullOrEmpty(v))
                        {
                            strRet += v + ",";
                        }
                    }
                }
            }
            catch (Exception ex)
            {

            }
            return strRet;
        }


        /// <summary>
        /// 整理不合格项目
        /// </summary>
        /// <param name="strValue"></param>
        /// <param name="lst"></param>
        private void ZJGetItemsAndFilter(string strValue, List<int> lst)
        {
            if (strValue != "-")
            {
                string end = strValue.Substring(strValue.Length - 1, 1);
                if (end == ",")
                {
                    string strItems = strValue.Trim().Substring(0, strValue.Length - 1);
                    if (strItems.Contains(","))
                    {
                        string[] items = strItems.Split(',');
                        foreach (var v in items)
                        {
                            lst.Add(Convert.ToInt32(v));
                        }
                    }
                    else
                    {
                        lst.Add(Convert.ToInt32(strItems));
                    }
                }
            }
            else
            {
                lst.Clear();
            }
        }

        /// <summary>
        /// 综检合并相同项目
        /// </summary>
        /// <param name="lstF"></param>
        /// <param name="lstS"></param>
        /// <returns></returns>
        private List<int> ZJComminItems(List<int> lstF, List<int> lstS)
        {
            List<int> lst = new List<int>();
            foreach (var v in lstF)
            {
                if (!lst.Contains(v))
                {
                    lst.Add(v);
                }
            }

            foreach (var v in lstS)
            {
                if (!lst.Contains(v))
                {
                    lst.Add(v);
                }
            }

            return lst;
        }
        #endregion

        #region 综检人工部分
        /// <summary>
        /// 得到人工外检表的基本信息部分
        /// </summary>
        /// <param name="dtBase"></param>
        /// <returns></returns>
        public DataTable GetDataTableRG_Base(DataTable dtBase)
        {
            return GetDataTableJSDJ_Base(dtBase);
        }

        /// <summary>
        /// 得到人工外检表的判定部分
        /// </summary>
        /// <param name="dtRG"></param>
        /// <returns></returns>
        public DataTable GetDataTableRG_PD(DataTable dtRG)
        {
            DataRow drRG = dtRG.NewRow();
            drRG["JCLSH"] = JCLSH;

            for (int i = 1; i < 102; i++)
            {
                drRG[i + "_PD"] = Pass;
            }

            RESULT_CHASISS_MANUAL_ZJ_BLL manual_bll = new RESULT_CHASISS_MANUAL_ZJ_BLL();
            foreach (var vJCLSH in lstJCLSH)
            {
                var vInfo = manual_bll.GetModel(vJCLSH);
                if (!string.IsNullOrEmpty(vInfo.RGJYBHGX.Trim()))
                {
                    if (vInfo.RGJYBHGX != Nothing)
                    {
                        string strRG = vInfo.RGJYBHGX.Substring(0, vInfo.RGJYBHGX.Length - 1);
                        if (strRG.IndexOf(',') > 0)
                        {
                            var items = strRG.Split(',');
                            foreach (var v in items)
                            {
                                drRG[v + "_PD"] = Fail;
                            }
                        }
                        else
                        {
                            if (!string.IsNullOrEmpty(strRG))
                            {
                                drRG[strRG + "_PD"] = Fail;
                            }
                        }
                    }
                    else
                    {
                        for (int j = 1; j < 85; j++)
                        {
                            drRG[j + "_PD"] = Pass;
                        }
                    }
                }
                else
                {
                    for (int j = 1; j < 85; j++)
                    {
                        drRG[j + "_PD"] = Nothing;
                    }
                }

                if (!string.IsNullOrEmpty(vInfo.DGJYBHGX.Trim()))
                {
                    for (int j = 85; j < 102; j++)
                    {
                        drRG[j + "_PD"] = Pass;
                    }

                    if (vInfo.DGJYBHGX != Nothing)
                    {
                        string strDG = vInfo.DGJYBHGX.Substring(0, vInfo.DGJYBHGX.Length - 1);
                        if (strDG.IndexOf(',') > 0)
                        {
                            var items = strDG.Split(',');
                            foreach (var v in items)
                            {
                                drRG[v + "_PD"] = Fail;
                            }
                        }
                        else
                        {
                            if (!string.IsNullOrEmpty(strDG))
                            {
                                drRG[strDG + "_PD"] = Fail;
                            }
                        }
                    }
                    else
                    {
                        for (int j = 85; j < 102; j++)
                        {
                            drRG[j + "_PD"] = Pass;
                        }
                    }
                }
                else
                {
                    for (int j = 85; j < 102; j++)
                    {
                        drRG[j + "_PD"] = Nothing;
                    }
                }

                if (!string.IsNullOrEmpty(vInfo.RGJYBJCX.Trim()))
                {
                    var strBPDXItem = vInfo.RGJYBJCX.Substring(0, vInfo.RGJYBJCX.Length - 1);
                    if (strBPDXItem.Contains(","))
                    {
                        var strBPDXList = strBPDXItem.Split(',');
                        foreach (var v in strBPDXList)
                        {
                            drRG[v + "_PD"] = NoAudit;
                        }
                    }
                    else
                    {
                        drRG[strBPDXItem + "_PD"] = NoAudit;
                    }
                }

                if (!string.IsNullOrEmpty(vInfo.DGJYBJCX.Trim()))
                {
                    var strBPDXItem = vInfo.DGJYBJCX.Substring(0, vInfo.DGJYBJCX.Length - 1);
                    if (strBPDXItem.Contains(","))
                    {
                        var strBPDXList = strBPDXItem.Split(',');
                        foreach (var v in strBPDXList)
                        {
                            drRG[v + "_PD"] = NoAudit;
                        }
                    }
                    else
                    {
                        drRG[strBPDXItem + "_PD"] = NoAudit;
                    }
                }
            }

            dtRG.Rows.Add(drRG);
            return dtRG;
        }

        /// <summary>
        /// 得到人工外检表的数据记录部分
        /// </summary>
        /// <param name="dtSJ"></param>
        /// <returns></returns>
        public DataTable GetDataTableRG_SJ(DataTable dtSJ)
        {
            List<int> lstRGJYBHGX = new List<int>();
            List<int> lstDGJYBHGX = new List<int>();

            RESULT_CHASISS_MANUAL_ZJ_BLL zjbll = new RESULT_CHASISS_MANUAL_ZJ_BLL();
            DataRow drSJ = dtSJ.NewRow();

            for (int m = 0; m < dtSJ.Columns.Count; m++)
            {
                drSJ[dtSJ.Columns[m]] = Nothing;
            }

            drSJ["JCLSH"] = JCLSH;

            for (int i = 0; i < lstJCLSH.Count; i++)
            {
                var zjInfo = zjbll.GetModel(lstJCLSH[i]);

                #region 轮胎花纹深度
                string lthwsd = zjInfo.LTHWSD;
                if (!string.IsNullOrEmpty(lthwsd))
                {
                    var items = lthwsd.Split(';');
                    drSJ["LTHWSD_ZXL"] = items[0];
                    drSJ["LTHWSD_QTL"] = items[1];
                    drSJ["LTHWSD_GC"] = NothingC;
                }
                else
                {
                    drSJ["LTHWSD_ZXL"] = NothingC;
                    drSJ["LTHWSD_QTL"] = NothingC;
                    drSJ["LTHWSD_GC"] = NothingC;
                }
                #endregion

                #region 车身与驾驶室
                string csyjss = zjInfo.CSYJSS;
                if (!string.IsNullOrEmpty(csyjss))
                {
                    csyjss = csyjss.Substring(0, csyjss.Length - 1);
                    var items = csyjss.Split(',');
                    drSJ["CSYJSS_LHSL"] = items[0];
                    if (items[1] == "0")
                    {
                        drSJ["CSYJSS_LHSL_0"] = Check;
                    }
                    else
                    {
                        drSJ["CSYJSS_LHSL_1"] = Check;
                    }
                }
                else
                {
                    drSJ["CSYJSS_LHSL_0"] = Empty;
                    drSJ["CSYJSS_LHSL_1"] = Empty;
                }
                #endregion

                #region 车身表面涂漆
                string csbmtz = zjInfo.CSBMTZ;
                if (!string.IsNullOrEmpty(csbmtz))
                {
                    csbmtz.Substring(0, csbmtz.Length - 1);
                    var items = csbmtz.Split(',');
                    if (items[0] == "0")
                    {
                        drSJ["CSBMTZ_PS_1"] = Check;
                    }
                    else
                    {
                        drSJ["CSBMTZ_PS_0"] = Check;
                    }
                    if (items[1] == "0")
                    {
                        drSJ["CSBMTZ_YZ_0"] = Check;
                    }
                    else
                    {
                        drSJ["CSBMTZ_YZ_1"] = Check;
                    }
                }
                else
                {
                    drSJ["CSBMTZ_PS_1"] = Empty;
                    drSJ["CSBMTZ_PS_0"] = Empty;
                    drSJ["CSBMTZ_YZ_0"] = Empty;
                    drSJ["CSBMTZ_YZ_1"] = Empty;
                }
                #endregion

                #region 门、窗玻璃
                string mcbl = zjInfo.MCBL;
                if (!string.IsNullOrEmpty(csyjss))
                {
                    mcbl = mcbl.Substring(0, mcbl.Length - 1);
                    var items = mcbl.Split(',');
                    if (items[0] == "1")
                    {
                        drSJ["MCBL_SFWH"] = Check;
                    }
                    if (items[1] == "1")
                    {
                        drSJ["MCBL_25_1"] = Check;
                    }
                    else
                    {
                        drSJ["MCBL_25_0"] = Check;
                    }
                    if (items[2] == "1")
                    {
                        drSJ["MCBL_MF_0"] = Check;
                    }
                    else
                    {
                        drSJ["MCBL_MF_1"] = Check;
                    }
                }
                else
                {
                    drSJ["MCBL_SFWH"] = Empty;
                    drSJ["MCBL_25_1"] = Empty;
                    drSJ["MCBL_25_0"] = Empty;
                    drSJ["MCBL_MF_0"] = Empty;
                    drSJ["MCBL_MF_1"] = Empty;
                }
                #endregion

                #region 对称部分高度差
                string dcbwgdc = zjInfo.DCBWGDC;
                if (!string.IsNullOrEmpty(dcbwgdc))
                {
                    var items = dcbwgdc.Split(';');
                    string[] strZCDCBWGDC = items[0].Split(',');
                    drSJ["DCBWGDC_DC_L1"] = strZCDCBWGDC[0];
                    drSJ["DCBWGDC_DC_R1"] = strZCDCBWGDC[1];
                    drSJ["DCBWGDC_DC_L2"] = strZCDCBWGDC[2];
                    drSJ["DCBWGDC_DC_R2"] = strZCDCBWGDC[3];
                    drSJ["DCBWGDC_GC_L1"] = Nothing;
                    drSJ["DCBWGDC_GC_R1"] = Nothing;
                    drSJ["DCBWGDC_GC_L2"] = Nothing;
                    drSJ["DCBWGDC_GC_R2"] = Nothing;
                }
                #endregion

                #region 转向盘最大自由转动量
                if (string.IsNullOrEmpty(zjInfo.ZXPZDZYZDL) == false)
                {
                    drSJ["ZXPZDZYZDL"] = zjInfo.ZXPZDZYZDL;
                }
                else
                {
                    drSJ["ZXPZDZYZDL"] = NothingC;
                }
                #endregion

                #region 轮廓尺寸
                RESULT_OVERALLSIZE_BLL osbll = new RESULT_OVERALLSIZE_BLL();
                var osInfo = osbll.GetModelList("JCLSH='" + JCLSH + "'");
                for (int o = 0; o < osInfo.Length; o++)
                {
                    drSJ["ZCSCWKCCCD"] = osInfo[o].ZCSCWKCCCD;
                    drSJ["ZCSCWKCCKD"] = osInfo[o].ZCSCWKCCKD;
                    drSJ["ZCSCWKCCGD"] = osInfo[o].ZCSCWKCCGD;
                    drSJ["HXSCWKCCCD"] = osInfo[o].HXSCWKCCCD;
                    drSJ["HXSCWKCCKD"] = osInfo[o].HXSCWKCCKD;
                    drSJ["HXSCWKCCGD"] = osInfo[o].HXSCWKCCGD;
                    drSJ["GCSCWKCCCD"] = osInfo[o].GCSCWKCCCD;
                    drSJ["GCSCWKCCKD"] = osInfo[o].GCSCWKCCKD;
                    drSJ["GCSCWKCCGD"] = osInfo[o].GCSCWKCCGD;
                }
                #endregion

                #region 车厢栏板高度
                string cxlbgd = zjInfo.CXLBGD;
                if (!string.IsNullOrEmpty(cxlbgd))
                {
                    var items = cxlbgd.Split(';');
                    drSJ["CXLBGD_DC"] = items[0];
                    drSJ["CXLBGD_GC"] = items[2];

                }
                #endregion

                #region 不合格项汇总
                //得到汇总的不合格项目，包括人工和地沟
                var lstSum = ZJComminItems(lstRGJYBHGX, lstDGJYBHGX);

                foreach (var a in lstSum)
                {
                    if (a < 12)
                    {
                        if (IsGC)
                        {
                            drSJ["WYXRZBHGX"] += "G" + a + "、";
                        }
                        else
                        {
                            drSJ["WYXRZBHGX"] += a + "、";
                        }
                    }
                    else if (a < 16)
                    {
                        if (IsGC)
                        {
                            drSJ["GZXXZD"] += "G" + a + "、";
                        }
                        else
                        {
                            drSJ["GZXXZD"] += a + "、";
                        }
                    }
                    else if (a < 69)
                    {
                        if (IsGC)
                        {
                            drSJ["WGJC"] += "G" + a + "、";
                        }
                        else
                        {
                            drSJ["WGJC"] += a + "、";
                        }
                    }
                    else if (a < 85)
                    {
                        if (IsGC)
                        {
                            drSJ["YXJC"] += "G" + a + "、";
                        }
                        else
                        {
                            drSJ["YXJC"] += a + "、";
                        }
                    }
                    else
                    {
                        if (IsGC)
                        {
                            drSJ["DPJC"] += "G" + a + "、";
                        }
                        else
                        {
                            drSJ["DPJC"] += a + "、";
                        }
                    }
                }

                if (drSJ["WYXRZBHGX"].ToString() == Nothing)
                {
                    drSJ["WYXRZBHGX"] = NothingC;
                }
                if (drSJ["GZXXZD"].ToString() == Nothing)
                {
                    drSJ["GZXXZD"] = NothingC;
                }
                if (drSJ["WGJC"].ToString() == Nothing)
                {
                    drSJ["WGJC"] = NothingC;
                }
                if (drSJ["YXJC"].ToString() == Nothing)
                {
                    drSJ["YXJC"] = NothingC;
                }
                if (drSJ["DPJC"].ToString() == Nothing)
                {
                    drSJ["DPJC"] = NothingC;
                }
                #endregion
            }

           dtSJ.Rows.Add(drSJ);
           return dtSJ;
        }

        /// <summary>
        /// 绑定综检人工报告单
        /// </summary>
        /// <param name="ds"></param>
        /// <returns></returns>
        public DataSet BindReportResource_RG(DataSet ds)
        {
            DataTable dtBase = GetDataTableRG_Base(ds.Tables["dtBase"]);
            DataTable dtRG = GetDataTableRG_PD(ds.Tables["dtRG"]);
            DataTable dtSJ = GetDataTableRG_SJ(ds.Tables["dtSJ"]);

            return ds;
        }

        #endregion

        #region 绑定综检二级维护
        public DataSet BindReportResource_EJ(DataSet ds)
        {
            DataTable dtBase = GetDataTableEJ_Base(ds.Tables["dtBase"]);
            DataTable dtJCZ = GetDataTableEJ_JCZ(ds.Tables["dtJCZ"]);
            DataTable dtBrakeD = GetDataTableEJ_BrakeD(ds.Tables["dtBrakeD"]);
            DataTable dtLS = GetDataTableEJ_LS(ds.Tables["dtLS"]);
            DataTable dtPF = GetDataTableEJ_PF(ds.Tables["dtPF"]);
            DataTable dtLamp = GetDataTableEJ_Lamp(ds.Tables["dtLamp"]);
            DataTable dtOthers = GetDataTableEJ_Others(ds.Tables["dtOthers"]);

            return ds;
        }

        private DataTable GetDataTableEJ_Others(DataTable dataTable)
        {
            throw new NotImplementedException();
        }

        private DataTable GetDataTableEJ_Lamp(DataTable dataTable)
        {
            throw new NotImplementedException();
        }

        private DataTable GetDataTableEJ_PF(DataTable dataTable)
        {
            throw new NotImplementedException();
        }

        private DataTable GetDataTableEJ_LS(DataTable dataTable)
        {
            throw new NotImplementedException();
        }

        private DataTable GetDataTableEJ_BrakeD(DataTable dataTable)
        {
            throw new NotImplementedException();
        }

        private DataTable GetDataTableEJ_JCZ(DataTable dataTable)
        {
            throw new NotImplementedException();
        }

        private DataTable GetDataTableEJ_Base(DataTable dataTable)
        {
            throw new NotImplementedException();
        }
        #endregion

        /// <summary>
        /// 得到最新的双怠速数据
        /// </summary>
        /// <param name="jclsh">JCLSH</param>
        /// <returns></returns>
        private RESULT_SDS Get_RESULT_SDS(string jclsh)
        {
            List<string> lst = GetAllJCLSH(jclsh,false);

            RESULT_SDS_BLL sds_bll = new RESULT_SDS_BLL();
            RESULT_SDS M_RESULT_SDS = new RESULT_SDS();
            RESULT_SDS T_RESULT_SDS = new RESULT_SDS();

            ModelReflection mR = new ModelReflection();

            for (int i = 0; i < lst.Count; i++)
            {
                T_RESULT_SDS = sds_bll.GetModel(lst[i]);
                if (i == 0)
                {
                    M_RESULT_SDS = T_RESULT_SDS;
                }

                mR.AutoMapping(T_RESULT_SDS, M_RESULT_SDS);
            }

            return M_RESULT_SDS;
        }

        /// <summary>
        /// 得到最新的稳态数据
        /// </summary>
        /// <param name="jclsh">JCLSH</param>
        /// <returns></returns>
        private RESULT_ASM Get_RESULT_ASM(string jclsh)
        {
            List<string> lst = GetAllJCLSH(jclsh,false);

            RESULT_ASM_BLL asm_bll = new RESULT_ASM_BLL();
            RESULT_ASM M_RESULT_ASM = new RESULT_ASM();
            RESULT_ASM T_RESULT_ASM = new RESULT_ASM();

            ModelReflection mR = new ModelReflection();

            for (int i = 0; i < lst.Count; i++)
            {
                T_RESULT_ASM = asm_bll.GetModel(lst[i]);
                if (i == 0)
                {
                    M_RESULT_ASM = T_RESULT_ASM;
                }

                mR.AutoMapping(T_RESULT_ASM, M_RESULT_ASM);
            }

            return M_RESULT_ASM;
        }

        /// <summary>
        /// 得到最新的瞬态数据
        /// </summary>
        /// <param name="jclsh">JCLSH</param>
        /// <returns></returns>
        private RESULT_VMAS Get_RESULT_VMAS(string jclsh)
        {
            List<string> lst = GetAllJCLSH(jclsh,false);

            RESULT_VMAS_BLL vmas_bll = new RESULT_VMAS_BLL();
            RESULT_VMAS M_RESULT_VMAS = new RESULT_VMAS();
            RESULT_VMAS T_RESULT_VMAS = new RESULT_VMAS();

            ModelReflection mR = new ModelReflection();

            for (int i = 0; i < lst.Count; i++)
            {
                T_RESULT_VMAS = vmas_bll.GetModel(lst[i]);
                if (i == 0)
                {
                    M_RESULT_VMAS = T_RESULT_VMAS;
                }

                mR.AutoMapping(T_RESULT_VMAS, M_RESULT_VMAS);
            }

            return M_RESULT_VMAS;
        }

        /// <summary>
        /// 得到最新的自由加速数据
        /// </summary>
        /// <param name="jclsh">JCLSH</param>
        /// <returns></returns>
        private RESULT_ZYJS Get_RESULT_ZYJS(string jclsh)
        {
            List<string> lst = GetAllJCLSH(jclsh,false);

            RESULT_ZYJS_BLL vmas_bll = new RESULT_ZYJS_BLL();
            RESULT_ZYJS M_RESULT_ZYJS = new RESULT_ZYJS();
            RESULT_ZYJS T_RESULT_ZYJS = new RESULT_ZYJS();

            ModelReflection mR = new ModelReflection();

            for (int i = 0; i < lst.Count; i++)
            {
                T_RESULT_ZYJS = vmas_bll.GetModel(lst[i]);
                if (i == 0)
                {
                    M_RESULT_ZYJS = T_RESULT_ZYJS;
                }

                mR.AutoMapping(T_RESULT_ZYJS, M_RESULT_ZYJS);
            }

            return M_RESULT_ZYJS;
        }

        /// <summary>
        /// 得到最新的自由加速数据
        /// </summary>
        /// <param name="jclsh">JCLSH</param>
        /// <returns></returns>
        private RESULT_LD Get_RESULT_LD(string jclsh)
        {
            List<string> lst = GetAllJCLSH(jclsh,false);

            RESULT_LD_BLL vmas_bll = new RESULT_LD_BLL();
            RESULT_LD M_RESULT_LD = new RESULT_LD();
            RESULT_LD T_RESULT_LD = new RESULT_LD();

            ModelReflection mR = new ModelReflection();

            for (int i = 0; i < lst.Count; i++)
            {
                T_RESULT_LD = vmas_bll.GetModel(lst[i]);
                if (i == 0)
                {
                    M_RESULT_LD = T_RESULT_LD;
                }

                mR.AutoMapping(T_RESULT_LD, M_RESULT_LD);
            }

            return M_RESULT_LD;
        }
    }
}
